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
error: uncaught exception during compilation: java.lang.AssertionError
error: java.lang.AssertionError: assertion failed:
while compiling: pickleTypeOfString.scala
during phase: pickler
library version: version 2.10.1
compiler version: version 2.10.1
reconstructed args:
last tree to typer: EmptyTree
symbol: null
symbol definition: null
tpe: <notype>
symbol owners:
context owners: trait OperationMapping -> package <empty>
== Enclosing template or block ==
ClassDef( // abstract trait OperationMapping extends AnyRef
<interface> abstract <defaultparam/trait>
"OperationMapping"
[]
Template( // val <local OperationMapping>: <notype> in trait OperationMapping, tree.tpe=OperationMapping
"java.lang.Object" // parents
ValDef(
private
"_"
<tpt>
<empty>
)
DefDef( // def bar: Int in trait OperationMapping
<method> <deferred> @{ foo(scala.reflect.runtime.`package`.universe.typeOf[String]({
val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(classOf[OperationMapping].getClassLoader());
$u.TypeTag.apply[String]($m, {
final class $typecreator1 extends TypeCreator {
def <init>(): $typecreator1 = {
$typecreator1.super.<init>();
()
};
def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.Mirror[U]): U#Type = {
val $u: U = $m$untyped.universe;
val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
$u.TypeRef.apply($u.SingleType.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticModule("scala.Predef")), $u.build.selectType($m.staticModule("scala.Predef").asModule.moduleClass, "String"), immutable.this.Nil)
}
};
new $typecreator1()
})
})) }
"bar"
[]
Nil
<tpt> // tree.tpe=Int
<empty>
)
)
)
== Expanded type of tree ==
<notype>
at scala.tools.nsc.symtab.classfile.Pickler$Pickle.writeArray(Pickler.scala:1107)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.scala$tools$nsc$symtab$classfile$Pickler$PicklePhase$$pickle$1(Pickler.scala:56)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.scala$tools$nsc$symtab$classfile$Pickler$PicklePhase$$pickle$1(Pickler.scala:50)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.apply(Pickler.scala:81)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:463)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:430)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:430)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:430)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1582)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1556)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
at scala.tools.nsc.Driver.doCompile(Driver.scala:33)
at scala.tools.nsc.Main$.doCompile(Main.scala:79)
at scala.tools.nsc.Driver.process(Driver.scala:54)
at scala.tools.nsc.Driver.main(Driver.scala:67)
at scala.tools.nsc.Main.main(Main.scala)
Exception in thread "main" java.lang.AssertionError: assertion failed:
while compiling: pickleTypeOfString.scala
during phase: pickler
library version: version 2.10.1
compiler version: version 2.10.1
reconstructed args:
last tree to typer: EmptyTree
symbol: null
symbol definition: null
tpe: <notype>
symbol owners:
context owners: trait OperationMapping -> package <empty>
== Enclosing template or block ==
ClassDef( // abstract trait OperationMapping extends AnyRef
<interface> abstract <defaultparam/trait>
"OperationMapping"
[]
Template( // val <local OperationMapping>: <notype> in trait OperationMapping, tree.tpe=OperationMapping
"java.lang.Object" // parents
ValDef(
private
"_"
<tpt>
<empty>
)
DefDef( // def bar: Int in trait OperationMapping
<method> <deferred> @{ foo(scala.reflect.runtime.`package`.universe.typeOf[String]({
val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(classOf[OperationMapping].getClassLoader());
$u.TypeTag.apply[String]($m, {
final class $typecreator1 extends TypeCreator {
def <init>(): $typecreator1 = {
$typecreator1.super.<init>();
()
};
def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.Mirror[U]): U#Type = {
val $u: U = $m$untyped.universe;
val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
$u.TypeRef.apply($u.SingleType.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticModule("scala.Predef")), $u.build.selectType($m.staticModule("scala.Predef").asModule.moduleClass, "String"), immutable.this.Nil)
}
};
new $typecreator1()
})
})) }
"bar"
[]
Nil
<tpt> // tree.tpe=Int
<empty>
)
)
)
== Expanded type of tree ==
<notype>
at scala.tools.nsc.symtab.classfile.Pickler$Pickle.writeArray(Pickler.scala:1107)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.scala$tools$nsc$symtab$classfile$Pickler$PicklePhase$$pickle$1(Pickler.scala:56)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.scala$tools$nsc$symtab$classfile$Pickler$PicklePhase$$pickle$1(Pickler.scala:50)
at scala.tools.nsc.symtab.classfile.Pickler$PicklePhase.apply(Pickler.scala:81)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:463)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:430)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:430)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:430)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1582)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1556)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
at scala.tools.nsc.Driver.doCompile(Driver.scala:33)
at scala.tools.nsc.Main$.doCompile(Main.scala:79)
at scala.tools.nsc.Driver.process(Driver.scala:54)
at scala.tools.nsc.Driver.main(Driver.scala:67)
at scala.tools.nsc.Main.main(Main.scala)
The text was updated successfully, but these errors were encountered:
@paulp said:
Minimized. Unrelated to reflection, actually due to the "tree pickler" being undocumented, untested, and carrying heavy duplication. We should not be depending on that code.
Reproduce code:
Expected result:
compiles fine.
Actual Result
The text was updated successfully, but these errors were encountered: