blob: 797c4a300d8cfb4e6f97dc7ce320c596bb5e1680 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}
}
}
|