Skip to content

Commit 321b616

Browse files
oderskyallanrenucci
authored andcommitted
More negative tests
These show that the technique used in mandubian/any-order-ubiklist.scala does not work here, since intersections are only allowed over *-types and AnyKind is not a *-type.
1 parent c825eb5 commit 321b616

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/neg/anykind.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ object AnyKinds {
66
type T0 = AnyKind[String] // error
77
type T1 = X[Int] // error
88
type T2 = X { type F = Int } // error
9+
type T3 <: List & AnyKind // error // error
10+
type T4 <: Int & AnyKind // error
911
val x: X = ??? // error
1012
}
1113

0 commit comments

Comments
 (0)