diff --git a/tests/pos-special/fatal-warnings/i7219.scala b/tests/pos-special/fatal-warnings/i7219.scala index fedfe9498b2c..903fc0429bf2 100644 --- a/tests/pos-special/fatal-warnings/i7219.scala +++ b/tests/pos-special/fatal-warnings/i7219.scala @@ -8,12 +8,6 @@ object Foo { object Bar { type Blue = Foo.Blue - - // Related Issue -- my expectation is that - // `export Foo.Blue` should be equivalent to - // `type Blue = Foo.Blue`, but it's not: - - // export Foo.Blue // Uncommenting this (and commenting `type Blue = ...`) results in compile error } import Foo._ diff --git a/tests/pos-special/fatal-warnings/i7219b.scala b/tests/pos-special/fatal-warnings/i7219b.scala new file mode 100644 index 000000000000..f2fea75771ea --- /dev/null +++ b/tests/pos-special/fatal-warnings/i7219b.scala @@ -0,0 +1,18 @@ +object Foo { + enum MyEnum { + case Red + case Blue(msg: String) + } + export MyEnum._ +} + +object Bar { + export Foo.Blue +} + +import Foo._ + +def foo(a: MyEnum): Seq[Bar.Blue] = a match { + case Red => Seq.empty + case m: Foo.Blue => Seq(m) +}