summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/unchecked-knowable.check7
-rw-r--r--test/files/neg/unchecked-knowable.scala4
2 files changed, 8 insertions, 3 deletions
diff --git a/test/files/neg/unchecked-knowable.check b/test/files/neg/unchecked-knowable.check
index 3a6ef994b5..d279427327 100644
--- a/test/files/neg/unchecked-knowable.check
+++ b/test/files/neg/unchecked-knowable.check
@@ -1,4 +1,7 @@
-unchecked-knowable.scala:17: error: fruitless type test: a value of type Bippy cannot also be a A1
+unchecked-knowable.scala:18: error: fruitless type test: a value of type Bippy cannot also be a A1
/* warn */ (new Bippy).isInstanceOf[A1]
^
-one error found
+unchecked-knowable.scala:19: error: fruitless type test: a value of type Bippy cannot also be a B1
+ /* warn */ (new Bippy).isInstanceOf[B1]
+ ^
+two errors found
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]
}