Skip to content

Commit

Permalink
Fix some more error ids
Browse files Browse the repository at this point in the history
Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Sep 4, 2024
1 parent 31d289e commit 183d2c7
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,17 @@ yield switch (rootCauseCode) {
case "compiler.err.not.exhaustive" -> IProblem.SwitchExpressionsYieldMissingDefaultCase;
case "compiler.err.switch.expression.empty" -> IProblem.SwitchExpressionsYieldMissingDefaultCase;
case "compiler.err.return.outside.switch.expression" -> IProblem.SwitchExpressionsReturnWithinSwitchExpression;
case "compiler.err.class.in.unnamed.module.cant.extend.sealed.in.diff.package" -> IProblem.SealedPermittedTypeOutsideOfPackage;
case "compiler.err.non.sealed.or.sealed.expected" -> IProblem.SealedMissingInterfaceModifier;
case "compiler.err.array.dimension.missing" -> IProblem.MustDefineEitherDimensionExpressionsOrInitializer;
case "compiler.warn.deprecated.annotation.has.no.effect" -> 0; // ignore this warning
case "compiler.err.enum.constant.not.expected" -> IProblem.UndefinedMethod;
case "compiler.warn.poor.choice.for.module.name" -> IProblem.ModuleRelated;
case "compiler.err.try.without.catch.finally.or.resource.decls" -> IProblem.Syntax;
case "compiler.warn.unchecked.meth.invocation.applied" -> IProblem.UnsafeTypeConversion;
case "compiler.err.encl.class.required" -> IProblem.MissingEnclosingInstanceForConstructorCall;
case "compiler.err.operator.cant.be.applied" -> IProblem.InvalidOperator;
case "compiler.warn.try.resource.not.referenced" -> 0; // ECJ doesn't do this
default -> {
ILog.get().error("Could not convert diagnostic (" + diagnostic.getCode() + ")\n" + diagnostic);
yield 0;
Expand Down

0 comments on commit 183d2c7

Please sign in to comment.