Skip to content

Commit 506c2e2

Browse files
committed
Change error message when enumeration type param is invariant
1 parent a3b7ed6 commit 506c2e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ object DesugarEnums {
7474
tparam.info.bounds.hi
7575
else {
7676
def problem =
77-
if (!tparam.isOneOf(VarianceFlags)) "is non variant"
77+
if (!tparam.isOneOf(VarianceFlags)) "is invariant"
7878
else "has bounds that depend on a type parameter in the same parameter list"
7979
errorType(i"""cannot determine type argument for enum parent $enumClass,
8080
|type parameter $tparam $problem""", ctx.source.atSpan(span))

0 commit comments

Comments
 (0)