We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1979904 commit 3c52af8Copy full SHA for 3c52af8
tests/neg/phantomInstanceOf2.scala
@@ -2,9 +2,10 @@ import dotty.phantom.PhantomAny
2
import dotty.phantom.PhantomNothing
3
import dotty.phantom.phantasmic
4
5
+class Blinky extends PhantomAny
6
+
7
class phantomInstanceOf2 {
- phantasmic[PhantomAny].asInstanceOf[Any] // error
- phantasmic[PhantomAny].asInstanceOf[Nothing] // error
8
- phantasmic[PhantomNothing].asInstanceOf[Any] // error
9
- phantasmic[PhantomNothing].asInstanceOf[Nothing] // error
+ new Blinky().asInstanceOf[Any] // error
+ new Blinky().asInstanceOf[Nothing] // error
10
+ new Blinky().asInstanceOf[PhantomAny] // error
11
}
0 commit comments