-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Milestone
Description
This looks like something tied up in AnyRef specialization and generic signatures. It's not clear to me what it is yet though. I'd appreciate any assistance.
[Removed red herring, compiling Function1.scala is enough.]
% scalac -d /tmp src/library/scala/Function1.scala
error: T1$sp in trait Function1$mcDL$sp cannot be instantiated from Function1$mcDL$sp
error:
while compiling: src/library/scala/Function1.scala
current phase: jvm
library version: version 2.10.0-M2-0091-g43532f1192-2012-03-04
compiler version: version 2.10.0-M2-0091-g43532f1192-2012-03-04
reconstructed args: -d /tmp
T1$sp in trait Function1$mcDL$sp cannot be instantiated from Function1$mcDL$sp
at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:38)
at scala.tools.nsc.Global.abort(Global.scala:189)
at scala.reflect.internal.Types$AsSeenFromMap.throwError$1(Types.scala:4078)
at scala.reflect.internal.Types$AsSeenFromMap.instParam$1(Types.scala:4098)
at scala.reflect.internal.Types$AsSeenFromMap.toInstance$1(Types.scala:4118)
at scala.reflect.internal.Types$AsSeenFromMap.apply(Types.scala:4136)
at scala.reflect.internal.Types$TypeMap$$anonfun$noChangeToSymbols$2.apply(Types.scala:3771)
at scala.reflect.internal.Types$TypeMap$$anonfun$noChangeToSymbols$2.apply(Types.scala:3771)
at scala.collection.LinearSeqOptimized$class.forall(LinearSeqOptimized.scala:69)
at scala.collection.immutable.List.forall(List.scala:77)
at scala.reflect.internal.Types$TypeMap.noChangeToSymbols(Types.scala:3771)
at scala.reflect.internal.Types$TypeMap.mapOver(Types.scala:3784){noformat}
These look right:
scala> classOf[scala.Function1[,]].getTypeParameters.toList
res3: List[java.lang.reflect.TypeVariable[Class[Function1[_, _]]]] = List(T1, R)
scala> classOf[scala.Function1$mcDL$sp[]].getTypeParameters.toList
res4: List[java.lang.reflect.TypeVariable[Class[Function1$mcDL$sp[]]]] = List(T1$sp)
{noformat}
Reactions are currently unavailable