Skip to content

Commit

Permalink
Revert "Missing names must have length 0, not length 7 representing <…
Browse files Browse the repository at this point in the history
…error>"

This reverts commit 0615a26.
  • Loading branch information
Rob Stryker committed Dec 10, 2024
1 parent 0615a26 commit 999fc3e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
import com.sun.tools.javac.parser.ParserFactory;
import com.sun.tools.javac.parser.Tokens.Comment;
import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
import com.sun.tools.javac.tree.DCTree.DCDocComment;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.TreeInfo;
import com.sun.tools.javac.tree.DCTree.DCDocComment;
import com.sun.tools.javac.tree.JCTree.JCAnnotatedType;
import com.sun.tools.javac.tree.JCTree.JCAnnotation;
import com.sun.tools.javac.tree.JCTree.JCAnyPattern;
Expand Down Expand Up @@ -124,7 +125,6 @@
import com.sun.tools.javac.tree.JCTree.JCWildcard;
import com.sun.tools.javac.tree.JCTree.JCYield;
import com.sun.tools.javac.tree.JCTree.Tag;
import com.sun.tools.javac.tree.TreeInfo;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.JCDiagnostic;
import com.sun.tools.javac.util.Log;
Expand Down Expand Up @@ -2877,8 +2877,7 @@ private IfStatement convertIfStatement(JCIf javac) {
Type convertToType(JCTree javac) {
if (javac instanceof JCIdent ident) {
Name name = convertName(ident.name);
int len = FAKE_IDENTIFIER.equals(name.toString()) ? 0 : ident.name.length();
name.setSourceRange(ident.getStartPosition(), len);
name.setSourceRange(ident.getStartPosition(), ident.name.length());
SimpleType res = this.ast.newSimpleType(name);
commonSettings(res, ident);
commonSettings(name, ident);
Expand Down

0 comments on commit 999fc3e

Please sign in to comment.