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 2fae09a commit 8dbeedb
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,17 @@ yield switch (rootCauseCode) {
case "compiler.err.switch.expression.empty" -> IProblem.SwitchExpressionsYieldMissingDefaultCase;
case "compiler.err.return.outside.switch.expression" -> IProblem.SwitchExpressionsReturnWithinSwitchExpression;
case "compiler.err.cant.apply.diamond.1" -> IProblem.NonGenericType;
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" -> IProblem.TypeRelated; // not in ECJ
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" -> IProblem.LocalVariableIsNeverUsed; // not in ECJ
default -> {
ILog.get().error("Could not convert diagnostic (" + diagnostic.getCode() + ")\n" + diagnostic);
yield 0;
Expand Down

0 comments on commit 8dbeedb

Please sign in to comment.