With 4.1.7 at -O1 (the default) I tried:
System.println(:foo == :foo); System.println(:foo != :foo);
and got "false, true" as output. That looked wrong, so I tried:
var x = :foo; System.println(x == x); System.println(x != x);
and got "true, false". So then for a moment I thought maybe it was "object identity vs object equality" (which would happen if you replaced :foo with "foo", for example). So I tried
var x = :foo; var y = :foo; System.println(:foo == :foo); System.println(:foo != :foo); System.println(x == x); System.println(x != x); System.println(x == y); System.println(x != y); System.println(x == :foo); System.println(x != :foo);
and got "false, true, true, false, true, false, true, false". So no nothing to do with object identity (no surprise - you can use them in case statements, for example), the compiler is just getting the results wrong when presented with two Symbol literals.
So I tried 4.1.5, and got the expected results. I also tried both 4.1.6 and 4.1.7 at -O0, and also got the expected results. So this is only incorrect at -O1 and -O2 with 4.1.6 and later.
Not a huge deal - you generally wouldn't *write* code like this, but it could show up as a result of copy propagation, for example.