diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index c0d7d1f5e3b..010903a8548 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -1144,6 +1144,11 @@ private SuperMethodInvocation convertSuperMethodInvocation(JCMethodInvocation ja private SuperConstructorInvocation convertSuperConstructorInvocation(JCMethodInvocation javac) { SuperConstructorInvocation res = this.ast.newSuperConstructorInvocation(); commonSettings(res, javac); + int end = res.getStartPosition() + res.getLength(); + if( end < this.rawText.length() && this.rawText.charAt(end-1) != ';' && this.rawText.charAt(end) == ';') { + // jdt expects semicolon to be part of the range + res.setSourceRange(res.getStartPosition(), res.getLength() + 1); + } javac.getArguments().stream().map(this::convertExpression).forEach(res.arguments()::add); //res.setFlags(javac.getFlags() | ASTNode.MALFORMED);