From 8d84b62fc9ca2bc01c7e3119088ddac185695124 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 6 Nov 2014 15:18:41 +1000 Subject: 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. --- test/files/run/t8933c.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/files/run/t8933c.scala (limited to 'test/files') 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 -- cgit v1.2.3