From 506c2e2e43f158ad4a164ada6ab3596a4836b28f Mon Sep 17 00:00:00 2001 From: Michael Pilquist Date: Tue, 26 Jan 2021 21:19:45 -0500 Subject: [PATCH] Change error message when enumeration type param is invariant --- compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala index d6d92c3fb078..def5cb39bee1 100644 --- a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala +++ b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala @@ -74,7 +74,7 @@ object DesugarEnums { tparam.info.bounds.hi else { def problem = - if (!tparam.isOneOf(VarianceFlags)) "is non variant" + if (!tparam.isOneOf(VarianceFlags)) "is invariant" else "has bounds that depend on a type parameter in the same parameter list" errorType(i"""cannot determine type argument for enum parent $enumClass, |type parameter $tparam $problem""", ctx.source.atSpan(span))