Skip to content

Commit

Permalink
Add one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Sep 13, 2019
1 parent 300b427 commit 81e4944
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/pos-special/fatal-warnings/i7219.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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._
Expand Down
18 changes: 18 additions & 0 deletions tests/pos-special/fatal-warnings/i7219b.scala
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 81e4944

Please sign in to comment.