Skip to content
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

compilation fails for scala 3 enum extending java Enum using sbt-scoverage plugin #16127

Closed
rolman243 opened this issue Sep 30, 2022 · 0 comments · Fixed by #16235
Closed

compilation fails for scala 3 enum extending java Enum using sbt-scoverage plugin #16127

rolman243 opened this issue Sep 30, 2022 · 0 comments · Fixed by #16235
Assignees
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug
Milestone

Comments

@rolman243
Copy link

rolman243 commented Sep 30, 2022

Compiler version

3.2.0

Minimized code

enum MyLogLevel extends Enum[MyLogLevel]:
  case Warn  extends MyLogLevel
  case Error extends MyLogLevel
  case Fatal extends MyLogLevel

Output

[error]   |enum MyLogLevel extends Enum[MyLogLevel]:
[error]   |                        ^^^^^^^^^^^^^^^^
[error]   |wrong number of arguments at constructors for (_$name: String, _$ordinal: Int): Enum: (MyLogLevel.super.<init> : (_$name: String, _$ordinal: Int): Enum), expected: 2, found: 0

[error]   |  case Warn  extends MyLogLevel
[error]   |                     ^^^^^^^^^^
[error]   |wrong number of arguments at constructors for (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel: ($anon.super.<init> : (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel), expected: 2, found: 0

[error]   |  case Error extends MyLogLevel
[error]   |                     ^^^^^^^^^^
[error]   |wrong number of arguments at constructors for (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel: ($anon.super.<init> : (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel), expected: 2, found: 0

[error]   |  case Fatal extends MyLogLevel
[error]   |                     ^^^^^^^^^^
[error]   |wrong number of arguments at constructors for (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel: ($anon.super.<init> : (_$name: String, _$ordinal: Int): fdn.core.log.MyLogLevel), expected: 2, found: 0

Expectation

The code compiles fine when using sbt clean coverage test.

Additional Notes

sbt 1.7.1
sbt-scoverage 2.0.4

@rolman243 rolman243 added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 30, 2022
@TheElectronWill TheElectronWill added area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Oct 2, 2022
@TheElectronWill TheElectronWill self-assigned this Oct 2, 2022
TheElectronWill added a commit to TheElectronWill/dotty that referenced this issue Oct 22, 2022
@TheElectronWill TheElectronWill linked a pull request Oct 23, 2022 that will close this issue
TheElectronWill added a commit to TheElectronWill/dotty that referenced this issue Oct 23, 2022
@Kordyjan Kordyjan added this to the 3.2.2 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants