diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-04-15 11:38:30 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-04-15 11:38:30 +0200 |
commit | 65719d3646e5092befa48de88f221b04dee20211 (patch) | |
tree | 4f0394c7de5b633ca8aed6cbf40313c686f79ea5 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | f6323d866f3b9a6fa9a5d0218a47922115974781 (diff) | |
parent | 4525e9223a2fb7c1ec3014073566b559e5839805 (diff) | |
download | scala-65719d3646e5092befa48de88f221b04dee20211.tar.gz scala-65719d3646e5092befa48de88f221b04dee20211.tar.bz2 scala-65719d3646e5092befa48de88f221b04dee20211.zip |
Merge remote-tracking branch 'origin/2.10.x' into merge/v2.10.1-235-g4525e92-to-master
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/Types.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 692c24fd20..ece6da2358 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3799,8 +3799,16 @@ trait Typers extends Adaptations with Tags { if (vd.symbol.tpe.isVolatile) AbstractionFromVolatileTypeError(vd) val tpt1 = typedType(tree.tpt, mode) - existentialTransform(whereClauses1 map (_.symbol), tpt1.tpe)((tparams, tp) => - TypeTree(newExistentialType(tparams, tp)) setOriginal tree + existentialTransform(whereClauses1 map (_.symbol), tpt1.tpe)((tparams, tp) => { + val original = tpt1 match { + case tpt : TypeTree => atPos(tree.pos)(ExistentialTypeTree(tpt.original, tree.whereClauses)) + case _ => { + debuglog(s"cannot reconstruct the original for $tree, because $tpt1 is not a TypeTree") + tree + } + } + TypeTree(newExistentialType(tparams, tp)) setOriginal original + } ) } |