-
Notifications
You must be signed in to change notification settings - Fork 1.1k
crash when extending trait that extends jl.Enum in REPL #9324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Fixed by #9487? Does not crash in the 0.27.0-RC1 REPL: scala> trait T extends java.lang.Enum[T]
// defined trait T
scala> class TEnum extends T
1 |class TEnum extends T
| ^
|class TEnum cannot extend java.lang.Enum: only enums defined with the enum syntax can |
if you use scala> trait T extends java.lang.Enum[T]
// defined trait T
scala> class TEnum extends T
1 |class TEnum extends T
| ^
|wrong number of arguments at functionalInterfaces for (_$name: String, _$ordinal: Int): Enum: (TEnum.super.<init> : (_$name: String, _$ordinal: Int): Enum), expected: 2, found: 0 |
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Oct 16, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Oct 16, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Oct 16, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Oct 16, 2020
bishabosha
added a commit
that referenced
this issue
Oct 19, 2020
fix #9324: forbid no-arg java.lang.Enum ctor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Minimized code
play these statements in the repl (launched with dotr 0.25.0-RC2)
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: