Check referencing instance variables from static context.

This commit is contained in:
Jindra Petřík
2025-05-30 23:36:46 +02:00
parent af408060b3
commit df9791ebda
11 changed files with 312 additions and 164 deletions
@@ -58,7 +58,7 @@ public abstract class ParseException extends Exception {
* @param line Line number where the exception occurred
*/
public ParseException(String text, long line, long position) {
super(text + " on line " + line);
super(text + (line == -1 ? "" : " on line " + line));
this.line = line;
this.text = text;
this.position = position;