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
@xeno-by said (edited on Nov 11, 2012 11:55:50 AM UTC):
This is intentional. If you run scala with -Xlog-implicits, it will explain the reason:
scala> { classB(b:Int); typeTag[B] }
materializing requested reflect.runtime.universe.type.TypeTag[B] using `package`.this.materializeTypeTag[B](scala.reflect.runtime.`package`.universe)
<console>:30: `package`.this.materializeTypeTag[B](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[B] because:
failed to typecheck the materialized tag:
cannot create a TypeTag referring to local classB
{ classB(b:Int); typeTag[B] }
^
<console>:30:error: NoTypeTag available forB
{ classB(b:Int); typeTag[B] }
^
scala> { classB(b:Int); weakTypeTag[B] }
res0: reflect.runtime.universe.WeakTypeTag[_ <:Object] =WeakTypeTag[B]
In REPL:
In 2.10.0-M7, this compiles fine.
The text was updated successfully, but these errors were encountered: