summaryrefslogtreecommitdiff
path: root/test/files/neg/bug663.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/bug663.scala')
-rwxr-xr-xtest/files/neg/bug663.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/neg/bug663.scala b/test/files/neg/bug663.scala
new file mode 100755
index 0000000000..797c4a300d
--- /dev/null
+++ b/test/files/neg/bug663.scala
@@ -0,0 +1,18 @@
+package test;
+trait Test {
+ type Matchable <: Node with MatchableImpl;
+ trait MatchableImpl extends NodeImpl {
+ def asMatch(node : Matchable) : Any;
+ }
+ type Node <: NodeImpl;
+ trait NodeImpl;
+ trait CoreIfImpl extends MatchableImpl {
+ // NO_CRASH: def asMatch(m : Matchable) = {
+ def asMatch(m : Node) : Any = {
+ if (m.isInstanceOf[MatchableImpl]) {
+ null;
+ } else null;
+ // NO_CRASH: null;
+ }
+ }
+}