-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support type references to types within quotes #7405
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
Labels
Comments
This should also work for path dependent types. import scala.quoted._
class Foo {
def f(given QuoteContext): Expr[Any] = {
'{
trait X {
type Y
def y: Y = ???
}
val x: X = ???
${
val t: Type[x.Y] = summon[Type[x.Y]]
'{ val y: $t = x.y }
}
}
}
} |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 4, 2019
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 4, 2019
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 5, 2019
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 16, 2019
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
OlivierBlanvillain
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 23, 2020
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
minimized code
fails with
expectation
This code should work.
To be able to have references to type tags of types defined in a higher level we need to generalize the concept of type healing. In this case we instead of needing to keep a type tag for the next stage it should be possible to refer to types for a next level. This is already the case inside of top level splices in inline methods (macros) but it should be possible to do in any code.
To make this change we will need to:
The text was updated successfully, but these errors were encountered: