aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t8369b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t8369b.scala')
-rw-r--r--tests/untried/pos/t8369b.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/untried/pos/t8369b.scala b/tests/untried/pos/t8369b.scala
new file mode 100644
index 000000000..3194463fb
--- /dev/null
+++ b/tests/untried/pos/t8369b.scala
@@ -0,0 +1,18 @@
+object Bug {
+ trait Sys[S] {
+ type Tx
+ }
+
+ trait Baz[-Tx]
+
+ trait Foo[S <: Sys[S]] {
+ def bar: Bar[S] = Bar.read[S]()
+ }
+
+ object Bar {
+ object NoBaz extends Baz[Any]
+
+ def read[S <: Sys[S]](baz: Baz[S#Tx] = NoBaz): Bar[S] = ???
+ }
+ trait Bar[S <: Sys[S]]
+}