diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-10-22 07:52:41 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-10-22 07:52:41 +0000 |
commit | 8484a8b26c62549e9deb5953d1497819e4ffccd7 (patch) | |
tree | 95df4963caff6716cac0bc04322c5c0bd8a907c5 | |
parent | f353a1d4fe83127f450941a9624ff562926984cf (diff) | |
download | scala-8484a8b26c62549e9deb5953d1497819e4ffccd7.tar.gz scala-8484a8b26c62549e9deb5953d1497819e4ffccd7.tar.bz2 scala-8484a8b26c62549e9deb5953d1497819e4ffccd7.zip |
fixed #1214
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 1 | ||||
-rw-r--r-- | test/files/pos/annotations.scala | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index ee50021da3..c1b58b822b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -287,6 +287,7 @@ trait Typers { self: Analyzer => case ErrorType => ; case PolyType(_, restpe) => check(restpe) case ExistentialType(_, restpe) if existentialOK => check(restpe) + case AnnotatedType(_, underlying, _) => check(underlying) case t => error(tpt.pos, "class type required but "+t+" found") } check(tpt.tpe) diff --git a/test/files/pos/annotations.scala b/test/files/pos/annotations.scala index 558fd62956..4e2bc6a9eb 100644 --- a/test/files/pos/annotations.scala +++ b/test/files/pos/annotations.scala @@ -10,6 +10,9 @@ object Test { def c: Int @ann(x) = 1 def d: String @ann({val z = 0; z - 1}) = "2" + //bug #1214 + val y = new (Integer @ann(0))(2) + import scala.reflect.BeanProperty // bug #637 |