aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Annotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-27 18:33:57 +0100
committerMartin Odersky <odersky@gmail.com>2013-10-27 18:33:57 +0100
commit52a8a0aec9da8a4eaa3faf95ec7acd3ecfbabf53 (patch)
tree7f029c717a8f8ea0787f669412ce2047e68a630d /src/dotty/tools/dotc/core/Annotations.scala
parent41e7d9d46177650d23447f99989e8347aca56e71 (diff)
downloaddotty-52a8a0aec9da8a4eaa3faf95ec7acd3ecfbabf53.tar.gz
dotty-52a8a0aec9da8a4eaa3faf95ec7acd3ecfbabf53.tar.bz2
dotty-52a8a0aec9da8a4eaa3faf95ec7acd3ecfbabf53.zip
Fixed unpickling of polymorphic constructors.
Constructors of parameterized classes now get polymorphic types when unpickled, as is the case when defining them or when reading them from a Java classfile. This caused a ripple of other faults which this commit also fixes.
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 221f5c160..8b7cb7bd7 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -61,6 +61,8 @@ object Annotations {
apply(defn.ChildAnnot.typeConstructor.appliedTo(NamedType(sym.owner.thisType, sym.name).withDenot(sym)), Nil)
}
- def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) =
- Annotation(defn.ThrowsAnnot, Ident(cls.symTypeRef))
+ def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = {
+ val tref = cls.symTypeRef
+ Annotation(defn.ThrowsAnnot.typeConstructor.appliedTo(tref), Ident(tref))
+ }
} \ No newline at end of file