Skip to content

Commit ed9b664

Browse files
committed
Add test
1 parent 80075e0 commit ed9b664

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/export-enum.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
object Signature {
2+
3+
enum MatchDegree {
4+
case NoMatch, ParamMatch, FullMatch
5+
}
6+
export MatchDegree._
7+
8+
// Check that exported values have singeleton types
9+
val x: MatchDegree.NoMatch.type = NoMatch
10+
11+
// Check that the following two methods are not exported.
12+
// Exporting them would lead to a double definition.
13+
def values: Array[MatchDegree] = ???
14+
def valueOf($name: String): MatchDegree = ???
15+
}

0 commit comments

Comments
 (0)