Skip to content
Permalink
Browse files
8274729: Define Position.NOPOS == Diagnostic.NOPOS
Reviewed-by: jlahoda
  • Loading branch information
jonathan-gibbons committed Oct 5, 2021
1 parent 1e75203 commit 332f0673880d547a5f09cb4efd3b952868a84b91
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/jdk.compiler/share/classes/com/sun/tools/javac/util/Position.java
@@ -29,6 +29,8 @@

import com.sun.tools.javac.util.DefinedBy.Api;

import javax.tools.Diagnostic;

import static com.sun.tools.javac.util.LayoutCharacters.*;

/** A class that defines source code positions as simple character
@@ -45,7 +47,7 @@
* deletion without notice.</b>
*/
public class Position {
public static final int NOPOS = -1;
public static final int NOPOS = (int) Diagnostic.NOPOS;

public static final int FIRSTPOS = 0;
public static final int FIRSTLINE = 1;

1 comment on commit 332f067

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 332f067 Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.