- Notifications
You must be signed in to change notification settings - Fork3.1k
Under-Xsource:3, adjust 2.13.9 change to ignore override type for whitebox macro expansion#10188
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
som-snytt commentedOct 13, 2022
Probably the
|
d8e6e83 to8ecb219Compare
lrytz left a comment
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 otherwise, thank you! This fix makes sense 👍
| privatedefassignTypeToTree(tree:ValOrDefDef,defnTyper:Typer,pt:Type):Type= { | ||
| valrhsTpe= treematch { | ||
| caseddef:DefDefif tree.symbol.isTermMacro=> defnTyper.computeMacroDefType(ddef, pt) | ||
| caseddef:DefDefif tree.symbol.isTermMacro=> defnTyper.computeMacroDefType(ddef, pt)// unreached, see methodSig |
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.
So this can be removed?
There's also a comment incomputeMacroDefType saying
if a macro def doesn't have explicitly specified return type, this method will be called again by
assignTypeToTree
is that stale?
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.
I was reluctant to expand the scope, as macros remain experimental.
SethTisue commentedOct 26, 2022
@lrytz want to press "merge", here? |
-Xsource:3, adjust 2.13.10 change to ignore override type for whitebox macro expansion-Xsource:3, adjust 2.13.10 change to ignore override type for whitebox macro expansion-Xsource:3, adjust 2.13.9 change to ignore override type for whitebox macro expansion
Uh oh!
There was an error while loading.Please reload this page.
Improve the condition for inferring the type of an overriding def under
-Xsource:3: use the precise type of the RHS if the RHS is the expansion of a whitebox macro.Adjusts#9891
Fixesscala/bug#12647