Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: v_borchert@despammed.com (Volker Borchert) Newsgroups: comp.lang.java.programmer Subject: Re: Funny error message Date: 18 May 2016 19:44:20 GMT Organization: Private site at Eddersheim, Germany Lines: 29 Distribution: world Message-ID: References: X-Trace: individual.net Hf2csYyNVe4ZkpDP0TPOOAhmwOj/L0CmozmICjOVy+8Tv2scTd Cancel-Lock: sha1:jANYcBoVwWPDZoRrpgH0Y8MG1H8= Xref: csiph.com comp.lang.java.programmer:34343 Stefan Ram wrote: > I am using javac with some additional tools, and I hope that > it was not one of those tools that has disorted the error > message, but here I see: > > Main.java:40: error: bad operand type String for unary operator '+++' > java.lang.System.out.println( + "" ); > ^ > 1 error > > Main.java:40: error: bad operand type String for unary operator '---' > java.lang.System.out.println( - "" ); > ^ > 1 error > > If you have the compiler sources: The error message seems to > be produced in javac\comp\Resolve.java, which might call > into javac\util\JCDiagnostic.java, but at this point, I > don't have the time to hunt down exactly where a '+' becomes > a '+++'. First thing I'd do would be to pipe above output through od -ax to uncover any nonprintable characters, in particular, backspace. -- "I'm a doctor, not a mechanic." Dr Leonard McCoy "I'm a mechanic, not a doctor." Volker Borchert