@@ -815,42 +815,37 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
815
815
* readAnnotation, readSymbolAnnotation, or readAnnotInfoArg
816
816
*/
817
817
protected def readAnnotationContents (end : Int )(implicit ctx : Context ): Tree = {
818
- ctx.atPhase(ctx.typerPhase) { implicit ctx => // needed to enable implicit search
819
- // and fix circullar dependency between annotation.currect invoking
820
- // elimrepeated that reads the same annotation
821
-
822
- val atp = readTypeRef()
823
- val args = {
824
- val t = new ListBuffer [Tree ]
825
-
826
- while (readIndex != end) {
827
- val argref = readNat()
828
- t += {
829
- if (isNameEntry(argref)) {
830
- val name = at(argref, readName)
831
- val arg = readClassfileAnnotArg(readNat())
832
- NamedArg (name.asTermName, arg)
833
- } else readAnnotArg(argref)
834
- }
818
+ val atp = readTypeRef()
819
+ val args = {
820
+ val t = new ListBuffer [Tree ]
821
+
822
+ while (readIndex != end) {
823
+ val argref = readNat()
824
+ t += {
825
+ if (isNameEntry(argref)) {
826
+ val name = at(argref, readName)
827
+ val arg = readClassfileAnnotArg(readNat())
828
+ NamedArg (name.asTermName, arg)
829
+ } else readAnnotArg(argref)
835
830
}
836
- t.toList
837
831
}
838
- println(atp)
839
- val typer = ctx.typer
840
- val proto = new FunProtoTyped (args, atp, typer)
841
- val alts = atp.member(nme.CONSTRUCTOR ).alternatives.map(_.termRef)
842
-
843
- val constructors = ctx.typer.resolveOverloaded(alts, proto, Nil , false )
844
- assert(constructors.size == 1 ) // this is parsed from bytecode tree. there's nothing user can do about it
845
-
846
- val constr = constructors.head
847
- val targs = atp.argTypes
848
- val fun = tpd.New (atp withoutArgs targs)
849
- .select(TermRef .withSig(atp.normalizedPrefix, constr.termSymbol.asTerm))
850
- .appliedToTypes(targs)
851
- val apply = untpd.Apply (fun, args)
852
- new typer.ApplyToTyped (apply, fun, constr, args, atp).result // needed to handle varargs
832
+ t.toList
853
833
}
834
+ println(atp)
835
+ val typer = ctx.typer
836
+ val proto = new FunProtoTyped (args, atp, typer)
837
+ val alts = atp.member(nme.CONSTRUCTOR ).alternatives.map(_.termRef)
838
+
839
+ val constructors = ctx.typer.resolveOverloaded(alts, proto, Nil )
840
+ assert(constructors.size == 1 ) // this is parsed from bytecode tree. there's nothing user can do about it
841
+
842
+ val constr = constructors.head
843
+ val targs = atp.argTypes
844
+ val fun = tpd.New (atp withoutArgs targs)
845
+ .select(TermRef .withSig(atp.normalizedPrefix, constr.termSymbol.asTerm))
846
+ .appliedToTypes(targs)
847
+ val apply = untpd.Apply (fun, args)
848
+ new typer.ApplyToTyped (apply, fun, constr, args, atp).result // needed to handle varargs
854
849
}
855
850
856
851
/** Read an annotation and as a side effect store it into
0 commit comments