-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove tpt
from Hole
#17455
Remove tpt
from Hole
#17455
Conversation
87e8a4d
to
10bbcd0
Compare
@@ -116,8 +116,7 @@ trait QuotesAndSplices { | |||
} | |||
|
|||
def typedHole(tree: untpd.Hole, pt: Type)(using Context): Tree = | |||
val tpt = typedType(tree.tpt) | |||
assignType(tree, tpt) | |||
assert(false, "Holes should only be typed by the ReTyper") |
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.
Not sure if there is a better pattern for this.
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.
We throw UnsupportedOperationException in a similar case: https://github.com/lampepfl/dotty/blob/d103f8c97913dbc2eea85b2b2b7b8251c547bdcf/compiler/src/dotty/tools/dotc/typer/Applications.scala#L1470-L1471
10bbcd0
to
082499b
Compare
@@ -116,8 +116,7 @@ trait QuotesAndSplices { | |||
} | |||
|
|||
def typedHole(tree: untpd.Hole, pt: Type)(using Context): Tree = | |||
val tpt = typedType(tree.tpt) | |||
assignType(tree, tpt) | |||
assert(false, "Holes should only be typed by the ReTyper") |
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.
We throw UnsupportedOperationException in a similar case: https://github.com/lampepfl/dotty/blob/d103f8c97913dbc2eea85b2b2b7b8251c547bdcf/compiler/src/dotty/tools/dotc/typer/Applications.scala#L1470-L1471
082499b
to
711fa7b
Compare
Should merge #17424 first and check for conflicts |
Now the type is kept in the `Hole` node.
711fa7b
to
2e71268
Compare
Now the type is kept in the
Hole
node.