Skip to content

Commit 0cee59b

Browse files
committed
Two new tests
1) Verify we survive illegal infinite paths. Closes #91. 2) Verify we handle fbounds in and types correctly.
1 parent f3d887f commit 0cee59b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

test/dotc/tests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class tests extends CompilerTest {
107107
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
108108
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 4)
109109
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
110+
@Test def neg_i0091_infpaths = compileFile(negDir, "i0091-infpaths", xerrors = 3)
110111
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
111112

112113
@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)(allowDeepSubtypes)

tests/neg/i0091-infpaths.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
object infpaths {
2+
3+
object a {
4+
trait T { t =>
5+
type M <: t.b.M
6+
type T <: a.T
7+
val b: t.T
8+
}
9+
val x: a.T = ???
10+
}
11+
12+
val m1: a.x.M = ???
13+
val m2: a.x.b.M = m1
14+
val m3: a.x.b.b.M = m2
15+
16+
}

tests/pos/fbounds.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class A [ T <: A[_] & Number]

0 commit comments

Comments
 (0)