aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/dotc/tests.scala1
-rw-r--r--tests/neg/i0091-infpaths.scala16
-rw-r--r--tests/pos/fbounds.scala1
3 files changed, 18 insertions, 0 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index f5072be96..db1121f97 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -107,6 +107,7 @@ class tests extends CompilerTest {
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 4)
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
+ @Test def neg_i0091_infpaths = compileFile(negDir, "i0091-infpaths", xerrors = 3)
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)(allowDeepSubtypes)
diff --git a/tests/neg/i0091-infpaths.scala b/tests/neg/i0091-infpaths.scala
new file mode 100644
index 000000000..917ea49a2
--- /dev/null
+++ b/tests/neg/i0091-infpaths.scala
@@ -0,0 +1,16 @@
+object infpaths {
+
+ object a {
+ trait T { t =>
+ type M <: t.b.M
+ type T <: a.T
+ val b: t.T
+ }
+ val x: a.T = ???
+ }
+
+ val m1: a.x.M = ???
+ val m2: a.x.b.M = m1
+ val m3: a.x.b.b.M = m2
+
+}
diff --git a/tests/pos/fbounds.scala b/tests/pos/fbounds.scala
new file mode 100644
index 000000000..dd56de37f
--- /dev/null
+++ b/tests/pos/fbounds.scala
@@ -0,0 +1 @@
+class A [ T <: A[_] & Number]