You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>valq"..$_; $_($_: ${tpe: Type})"=| typecheck(q""" | def id(i: Int) = i | val a = 42 | id(a) | """)
tpe: reflect.runtime.universe.Type=Int
i.e. piggyback on ascription syntax to extract tree.tpe in pattern matching.
Alternatively the same can be done through magic annotation as in #8250 but ascription looks more elegant for this purpose.
The text was updated successfully, but these errors were encountered:
i.e. piggyback on ascription syntax to extract tree.tpe in pattern matching.
Alternatively the same can be done through magic annotation as in #8250 but ascription looks more elegant for this purpose.
The text was updated successfully, but these errors were encountered: