diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-18 04:02:27 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-18 08:59:18 -0700 |
commit | 6ff9db6362c0b19c72b3b0ca2721367a85e13189 (patch) | |
tree | d624a54599150f898dc2cafaf609ad31eb5fbdd7 /test/files/pos | |
parent | 25ad7876a97aafb7a33283843b05023e48cedc55 (diff) | |
download | scala-6ff9db6362c0b19c72b3b0ca2721367a85e13189.tar.gz scala-6ff9db6362c0b19c72b3b0ca2721367a85e13189.tar.bz2 scala-6ff9db6362c0b19c72b3b0ca2721367a85e13189.zip |
Fix for SI-6537, inaccurate unchecked warning.
I found a more direct expression of the unchecked logic,
which should be much easier for others to verify. But the
bug being fixed here is that the unchecked checking happens
too early, and the sealed children of a symbol are not yet
visible if it is being simultaneously compiled.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6537.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6537.scala | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t6537.flags b/test/files/pos/t6537.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/pos/t6537.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/pos/t6537.scala b/test/files/pos/t6537.scala new file mode 100644 index 0000000000..d0ca3ba435 --- /dev/null +++ b/test/files/pos/t6537.scala @@ -0,0 +1,16 @@ +package tester + +object PatMatWarning { + + sealed trait X + sealed trait Y + + def f(x: X) = x match { + case _: Y => false + case _ => true + } + + class X1 extends X + class Y1 extends Y + class Z1 extends X with Y +} |