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 /test/files/pos/t7784.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 'test/files/pos/t7784.scala')
-rw-r--r-- | test/files/pos/t7784.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t7784.scala b/test/files/pos/t7784.scala new file mode 100644 index 0000000000..4260ca26a2 --- /dev/null +++ b/test/files/pos/t7784.scala @@ -0,0 +1,9 @@ +object Test { + final val a = "" + var b: a.type = a + b = a + + final val x = classOf[Object] + var y: x.type = x + y = x +} |