diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-21 16:27:55 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-21 16:27:55 -0800 |
commit | 9a2455aee4cfb09030ff2c2c0e6861326487e474 (patch) | |
tree | 32007c185ead3c10f70abe6bbb5b44f66b568c55 /src | |
parent | f62d35b0d400e4d8a68046707450e58aa6d8adca (diff) | |
parent | 26be2067a9dcc0aa44063aa94581d970427c8ad6 (diff) | |
download | scala-9a2455aee4cfb09030ff2c2c0e6861326487e474.tar.gz scala-9a2455aee4cfb09030ff2c2c0e6861326487e474.tar.bz2 scala-9a2455aee4cfb09030ff2c2c0e6861326487e474.zip |
Merge pull request #2152 from retronym/topic/annotatedRetyping-2.10.1
SI-7163 backport of annotated retyping to 2.10.1
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 478312116a..cff3f4f0fa 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4153,15 +4153,11 @@ trait Typers extends Modes with Adaptations with Tags { def resultingTypeTree(tpe: Type) = { // we need symbol-ful originals for reification // hence we go the extra mile to hand-craft tis guy - val original = - if (arg1.isType) - 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(ann, arg1) - } - else - tree + val 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(ann, arg1) + } original setType ann.tpe TypeTree(tpe) setOriginal original setPos tree.pos.focus } |