summaryrefslogtreecommitdiff
path: root/test/files/neg/t7171b.flags
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-02-22 22:04:58 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-02-22 23:21:59 +0100
commit3d5758ca705be7f304d0a09f749e5742ec37231b (patch)
tree97edbddc6403692d5462b5e3ad929d9a6e7450dc /test/files/neg/t7171b.flags
parentc58838605b390f21134c67c6106713df2f4af848 (diff)
downloadscala-3d5758ca705be7f304d0a09f749e5742ec37231b.tar.gz
scala-3d5758ca705be7f304d0a09f749e5742ec37231b.tar.bz2
scala-3d5758ca705be7f304d0a09f749e5742ec37231b.zip
SI-7171 Consider prefix when assessing type finality.
`Type#isFinalType` determines if a type could have a non-bottom subtype. This property is exploited by the pattern matcher to flag impossible patterns. This check was ignoring the type's prefix, and incorrectly deemed that `T#A` in `trait T { final class A }` was a final type. But it could have been subtyped by `U#A` where `U` <:< `T`, or, more simply, by `T.this.A`. Now, type finality requires that the prefix is stable. The existing test cases in neg/patmat-type-check.scala still correctly flag incompatiblities. `isFinalType` is also used by some code that massages pattern matches post specialization. That is actually either broken or obsolete under virtpatmat, I've opened SI-7172 to invesigate that. It is also used by GenICode to determine whether to emit the appropriate equality checks that are correct in the face of boxing. It is possible that this change will force the slow path in some rare cases, but it won't affect correctness.
Diffstat (limited to 'test/files/neg/t7171b.flags')
-rw-r--r--test/files/neg/t7171b.flags1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/neg/t7171b.flags b/test/files/neg/t7171b.flags
new file mode 100644
index 0000000000..464cc20ea6
--- /dev/null
+++ b/test/files/neg/t7171b.flags
@@ -0,0 +1 @@
+-Xfatal-warnings -unchecked \ No newline at end of file