diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-11-23 02:33:56 -0800 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-11-23 02:33:56 -0800 |
commit | 5b498a2612f967c944fa1ed4f63a09d6acc41791 (patch) | |
tree | b19851d1264adea4a6cff3dbfd117cd89383d1a8 /src | |
parent | a0e642b7fe608b869071b690e7907b934b10db5a (diff) | |
parent | 548a54d708d8aaceea6abe0931aabaa70b2cd925 (diff) | |
download | scala-5b498a2612f967c944fa1ed4f63a09d6acc41791.tar.gz scala-5b498a2612f967c944fa1ed4f63a09d6acc41791.tar.bz2 scala-5b498a2612f967c944fa1ed4f63a09d6acc41791.zip |
Merge pull request #1660 from scalamacros/topic/6023
SI-6023 reify abstract vals
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala b/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala index e8a2c9f43c..acc4f7ff67 100644 --- a/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala +++ b/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala @@ -426,6 +426,7 @@ trait MethodSynthesis { // spot that brand of them. In other words it's an artifact of the implementation. val tpt = derivedSym.tpe.finalResultType match { case ExistentialType(_, _) => TypeTree() + case _ if mods.isDeferred => TypeTree() case tp => TypeTree(tp) } tpt setPos derivedSym.pos.focus diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 222c9ff8c3..a2aca45e8f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -5368,8 +5368,14 @@ trait Typers extends Modes with Adaptations with Tags { } def typedTypeTree(tree: TypeTree) = { - if (tree.original != null) - tree setType typedType(tree.original, mode).tpe + if (tree.original != null) { + val newTpt = typedType(tree.original, mode) + tree setType newTpt.tpe + newTpt match { + case tt @ TypeTree() => tree setOriginal tt.original + case _ => tree + } + } else // we should get here only when something before failed // and we try again (@see tryTypedApply). In that case we can assign |