Skip to content

Commit 4239950

Browse files
Merge pull request #6232 from dotty-staging/fix/i5019
Fix #5019: test if new on enums is illegal
2 parents bfd5c89 + 76757ba commit 4239950

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/neg/i5019.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
enum A { // error
2+
def newA(tag: Int) = new A { val enumTag = tag } // error
3+
}

0 commit comments

Comments
 (0)