summaryrefslogtreecommitdiff
path: root/test/files/neg/unchecked-knowable.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-18 04:02:27 -0700
committerPaul Phillips <paulp@improving.org>2012-10-18 08:59:18 -0700
commit6ff9db6362c0b19c72b3b0ca2721367a85e13189 (patch)
treed624a54599150f898dc2cafaf609ad31eb5fbdd7 /test/files/neg/unchecked-knowable.scala
parent25ad7876a97aafb7a33283843b05023e48cedc55 (diff)
downloadscala-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/neg/unchecked-knowable.scala')
-rw-r--r--test/files/neg/unchecked-knowable.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/neg/unchecked-knowable.scala b/test/files/neg/unchecked-knowable.scala
index 667b47f504..21624c4fb4 100644
--- a/test/files/neg/unchecked-knowable.scala
+++ b/test/files/neg/unchecked-knowable.scala
@@ -7,6 +7,7 @@ final class A4 extends A2
/** Unknowable */
sealed abstract class B1
sealed abstract class B2 extends B1
+sealed trait B2B extends B1
final class B3 extends B1
trait B4 extends B2
@@ -15,6 +16,7 @@ trait Dingus
class A {
/* warn */ (new Bippy).isInstanceOf[A1]
- /* nowarn */ (new Bippy).isInstanceOf[B1]
+ /* warn */ (new Bippy).isInstanceOf[B1]
+ /* nowarn */ (null: Dingus).isInstanceOf[B1]
/* nowarn */ ((new Bippy): Any).isInstanceOf[A1]
}