diff options
author | Martin Odersky <odersky@gmail.com> | 2015-05-15 16:48:29 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-15 16:48:29 +0200 |
commit | 743c6bb43334c70581f99c849b14ecab5981544e (patch) | |
tree | f93a55fdb2dc280cf37e20f341e4a6bc7904d1ed /src/dotty/tools/dotc/core/Annotations.scala | |
parent | 49e537e10f572340e2d8f8ac632a5c05227b694f (diff) | |
download | dotty-743c6bb43334c70581f99c849b14ecab5981544e.tar.gz dotty-743c6bb43334c70581f99c849b14ecab5981544e.tar.bz2 dotty-743c6bb43334c70581f99c849b14ecab5981544e.zip |
Make Child annotation lazy
Otherwise we get bootstrap problems when trying to compile Child:
Completing Predef with the Scala2Unpickler causes Child annotations
to be added to parents of case classes. But completing Child would depend
on completion of Predef. Making child annotations lazy avoids the cycle.
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Annotations.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala index 0dc7113f2..6d0fba337 100644 --- a/src/dotty/tools/dotc/core/Annotations.scala +++ b/src/dotty/tools/dotc/core/Annotations.scala @@ -90,7 +90,8 @@ object Annotations { ref(TermRef.withSigAndDenot(sym.owner.thisType, sym.name, sym.signature, sym)))) def makeChild(sym: Symbol)(implicit ctx: Context) = - apply(defn.ChildAnnot.typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil) + deferred(defn.ChildAnnot, + implicit ctx => New(defn.ChildAnnot.typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil)) } def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = { |