Skip to content

Commit 4a6ec60

Browse files
authored
Merge pull request #11224 from mpilquist/topic/enum-invariant-message
Change error message when enumeration type param is invariant
2 parents 266ee03 + 506c2e2 commit 4a6ec60

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)