diff --git a/tests/pos/i6003.scala b/tests/pos/i6003.scala new file mode 100644 index 000000000000..6a9c105af075 --- /dev/null +++ b/tests/pos/i6003.scala @@ -0,0 +1,12 @@ +object Test { + opaque type T = String + object T { + def unwrap(t: T): String = t + } + + opaque type U = String + type W = U + object U { + def unwrap(w: W): String = w: U + } +} \ No newline at end of file