Evil bug :)
I post it here instead of in Jira, because it's plain evil, in a funny way :).
Imagine you have this code:
This code won't compile, but Intelli doesn't report an error about it. What happens, is that \u000A is interpreted by the Java compiler as a newline, thus producing the following code:
This, ofcourse, does not compile. It would be nice if IntelliJ would mark this as an error!
Erik
请先登录再写评论。
Hello,
This one from Java Puzzles :)
And this is not a bug :)
The realy bug this '\n' in IntelliJ IDEA, is here:
Type string with '\n', copy it into clipboard, paste it.
Correct :)
Okay, this may not be a bug, but more of a feature request than, to correctly identify this as being Illegal?
Or a least give an error about the text after the unicode character? The JDK does the same.
Ah, nice bug! Never noticed it!
Not sure, that JDK (javac, i guess) make this checking.