Community
Participate
Working Groups
I created a new Class and typed the following into it: public class FOOBY { Fribbit; } On saving this class, I get a syntax error at the ";" after Fribbit. The compiler message is confusing because it does not distinguish the actual token it stopped at with the list of tokens it would accept instead: Syntax error on token ";", "=", "*=", "/=", "%=", "+=", "- =", "<<=", ">>=", ">>>=", "&=", "^=", "|=" expected The list of expected alternatives is comma-separated, and the actual token is followed by a comma. It just looks like one big list. Suggestion: put the 'expected' before the list: Syntax error on token ";", expected "=", "*=", ... In cases like this, it would be more useful anyway if the message said: Syntax error on token ";", expected assignment-operator I.e. any time the list of alternatives is longer than 3, it is more distracting than actually useful.
Deferring post 2.1
Reconsidering given new syntax error diagnosis heuristic
Fixed. The new error message is: Syntax error on token "Fribbit", VariableDeclarator expected after this token
Verified.