Skip to content

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

Closed
@rolman243

Description

@rolman243

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

Metadata

Metadata

Labels

area:coverageCode coverage, see https://dotty.epfl.ch/docs/internals/coverage.htmlitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions