diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-11-06 15:18:41 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-11-07 18:19:31 +1000 |
commit | 8d84b62fc9ca2bc01c7e3119088ddac185695124 (patch) | |
tree | d4d1af8c69bee6c9b697842923aad4882320302f /test | |
parent | 33393c759cc6081cffc3089baf806c08d64dbffc (diff) | |
download | scala-8d84b62fc9ca2bc01c7e3119088ddac185695124.tar.gz scala-8d84b62fc9ca2bc01c7e3119088ddac185695124.tar.bz2 scala-8d84b62fc9ca2bc01c7e3119088ddac185695124.zip |
SI-7974 Fix over-eager optimization of Symbol literals
A classic mistake of discarding a non-trivial qualifier.
We actually should have fixed this before merging #3149, as it
was raised in review, but I suppose we got too caught up in the
difficulty of resolving the right overload of `Symbol_apply` that we
forgot.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t8933c.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t8933c.scala b/test/files/run/t8933c.scala new file mode 100644 index 0000000000..22011bc323 --- /dev/null +++ b/test/files/run/t8933c.scala @@ -0,0 +1,14 @@ +object Test { + def main(args: Array[String]): Unit = { + try { + {throw T; Symbol}.apply("a") + assert(false, "exception not thrown") + } catch { + case T => // ok + case t: Throwable => + assert(false, "wrong not thrown: " + t) + } + } +} + +object T extends Throwable |