-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add back symbols to TASTy reflect #4976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back symbols to TASTy reflect #4976
Conversation
It's cool that exported symbols are compared by Another problem is that we still expose the internal details of desugaring of source definitions into definitions and symbols — objects create two symbols, case classes must create 1 for the class and two for the companion, etc. Those details might be appropriate for tasty reflection since it shows the typer output (tho @olafurpg has spent time hiding many such things), but only as long as they're things you'd be comfortable spec'ing — because that's what you are essentially doing even if you don't write that spec down. Details about e.g. enum are more concerning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -2,4 +2,4 @@ package dotty.tools.dotc.tastyreflect | |||
|
|||
import dotty.tools.dotc.core._ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the following line into several lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -2,4 +2,4 @@ package scala.tasty | |||
|
|||
import scala.tasty.reflect._ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reformat the following line to be shorter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** Tasty reflect symbol */ | ||
trait SymbolOps extends TastyCore { | ||
|
||
trait SymbolasAPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SymbolasAPI
-> SymbolsAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
def localContext(implicit ctx: Context): Context | ||
def tree(implicit ctx: Context): Option[Definition] | ||
} | ||
implicit def SymbolasDeco(symbol: Symbol): SymbolasAPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
No description provided.