diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-06 13:20:30 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-06-08 15:23:07 +0200 |
commit | 74486cf519ac970e545578597b81f260c10b80b6 (patch) | |
tree | 844d20fd15c08d32ffee05f6f685efbbb6b21f38 /src/compiler | |
parent | d81d39231dacda9b08b5ae325e11d4f4b994857f (diff) | |
download | scala-74486cf519ac970e545578597b81f260c10b80b6.tar.gz scala-74486cf519ac970e545578597b81f260c10b80b6.tar.bz2 scala-74486cf519ac970e545578597b81f260c10b80b6.zip |
typers: simplifies original calculation in typedAnnotated
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b2e7088465..88118adbe5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3694,11 +3694,10 @@ trait Typers extends Modes with Adaptations with Taggings { // hence we go the extra mile to hand-craft tis guy val original = if (arg1.isType) - (tree, arg1) match { - case (Annotated(annot, arg), tt @ TypeTree()) => Annotated(annot, tt.original) + arg1 match { + case tt @ TypeTree() => Annotated(ann, tt.original) // this clause is needed to correctly compile stuff like "new C @D" or "@(inline @getter)" - case (Annotated(annot, arg), _) => Annotated(annot, arg1) - case _ => throw new Error("unexpected trees in typedAnnotated: tree = %s, arg1 = %s".format(showRaw(tree), showRaw(arg1))) + case _ => Annotated(ann, arg1) } else tree |