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
The following session of power REPL shows the problem. See comments below.
scala
Welcome to Scala version 2.10.0 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_37).
Type in expressions to have them evaluated.
Type:help for more information.
scala>classC { @throws(classOf[Throwable]) defmeh=??? }
defined classC
scala>:power
**PowerUser mode enabled -BEEPWHIRGYVE****:phase has been set to 'typer'. **** scala.tools.nsc._ has been imported **** global._, definitions._ also imported ****Try:help, :vals, power.<tab> **
scala> typeOf[C].typeSymbol.info.member(newTermName("meh"))
res0: $r.intp.global.Symbol= method meh
scala>valann= res0.annotations.head
ann: $r.intp.global.AnnotationInfo= throws[T](classOf[java.lang.Throwable])
scala> ann.atp.typeArgs
res1:List[$r.intp.global.Type] =List(T)
scala> res1.head.typeSymbol
res2: $r.intp.global.Symbol=typeT
scala> res2.getClass
res3:Class[_ <: $r.intp.global.Symbol] =classscala.reflect.internal.Symbols$AbstractTypeSymbol
Last few lines verify that this is not printing problem. The type of annotation has type argument that is not determined. One could think that type inference does not happen for polymorphic annotations but Adriaan checked that and it turns out that we properly type the annotation (including performing correct type inference) but somehow that tree doesn't get back to DefDef node.
The text was updated successfully, but these errors were encountered:
@gkossakowski said:
Eugene, thanks for closing it. In the future it would be great if you could link (using More actions -> Link) to the issue being duplicated.
The following session of power REPL shows the problem. See comments below.
Last few lines verify that this is not printing problem. The type of annotation has type argument that is not determined. One could think that type inference does not happen for polymorphic annotations but Adriaan checked that and it turns out that we properly type the annotation (including performing correct type inference) but somehow that tree doesn't get back to DefDef node.
The text was updated successfully, but these errors were encountered: