diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-11-07 19:23:04 +1000 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-02-28 07:45:49 -0800 |
commit | abc12d772c30e4e54f5740569950c730de008c2e (patch) | |
tree | 3f58fb984cf439f95bd0a7d5e6d0a09232bb161b /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | d30098c30de94e6ec07b5c8b6782357183e24179 (diff) | |
download | scala-abc12d772c30e4e54f5740569950c730de008c2e.tar.gz scala-abc12d772c30e4e54f5740569950c730de008c2e.tar.bz2 scala-abc12d772c30e4e54f5740569950c730de008c2e.zip |
SI-7784 Allow a singleton type over a constant value defn.
When typechecking a `SingletonTypeTree`, we must `deconst`
the type of the typechecked reference tree to avoid collapsing
`a.type` into a constant type if `a` is a constant value definition.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e883bacc88..7f86a59164 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -5193,7 +5193,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper if (refTyped.isErrorTyped) { setError(tree) } else { - tree setType refTyped.tpe.resultType + tree setType refTyped.tpe.resultType.deconst if (refTyped.isErrorTyped || treeInfo.admitsTypeSelection(refTyped)) tree else UnstableTreeError(tree) } |