Skip to content

Change error message when enumeration type param is invariant #11224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down