You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code fails to compile with sbt clean coverage test but compiles fine with sbt clean compile test
import scribe.Level
enum MetricLogLevel(val level: Level) extends Enum[MetricLogLevel]:
case Warn extends MetricLogLevel(Level.Warn)
case Error extends MetricLogLevel(Level.Error)
case Fatal extends MetricLogLevel(Level.Fatal)
Compiler failure:
[error] |enum MetricLogLevel(val level: Level) extends Enum[MetricLogLevel]:
[error] | ^^^^^^^^^^^^^^^^^^^^
[error] |wrong number of arguments at constructors for (_$name: String, _$ordinal: Int): Enum: (MetricLogLevel.super.<init> : (_$name: String, _$ordinal: Int): Enum), expected: 2, found: 0
[error] | case Warn extends MetricLogLevel(Level.Warn)
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |wrong number of arguments at constructors for (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel: ($anon.super.<init> :
[error] | (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel
[error] |), expected: 3, found: 1
[error] | case Error extends MetricLogLevel(Level.Error)
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |wrong number of arguments at constructors for (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel: ($anon.super.<init> :
[error] | (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel
[error] |), expected: 3, found: 1
[error] | case Fatal extends MetricLogLevel(Level.Fatal)
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |wrong number of arguments at constructors for (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel: ($anon.super.<init> :
[error] | (level: scribe.Level, _$name: String, _$ordinal: Int):
[error] | fdn.core.log.MetricLogLevel
[error] |), expected: 3, found: 1
The documentation for constructor of the abstract java Enum class states:
/**
* Sole constructor. Programmers cannot invoke this constructor.
* It is for use by code emitted by the compiler in response to
* enum class declarations.
*
* @param name - The name of this enum constant, which is the identifier
* used to declare it.
* @param ordinal - The ordinal of this enumeration constant (its position
* in the enum declaration, where the initial constant is assigned
* an ordinal of zero).
*/
protected Enum(String name, int ordinal) {
this.name = name;
this.ordinal = ordinal;
}
The text was updated successfully, but these errors were encountered:
Hey @rolman243 thanks for the report. sbt-scoverage is just a thin wrapper facilitation everything. For Scala 3 the coverage logic is actually included in the compiler. Could you report this there?
scoverage version: 2.0.4
scala versoin: 3.2.0
sbt version: 1.7.1
The following code fails to compile with
sbt clean coverage test
but compiles fine withsbt clean compile test
Compiler failure:
The documentation for constructor of the abstract java Enum class states:
The text was updated successfully, but these errors were encountered: