This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The following code in java will print "true" in the console when compiled and run in netbeans. public class Simple { public static void main(String[] args) throws Exception { boolean var1 = true; if (var1 |= false) { System.out.println(var1); } } } However, the editor shows the hint "The branch is never used" on the line with the if statement.
Reproducible
Fixed in jet-main#e01dbf9549e1
Integrated into 'main-silver', will be available in build *201509170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/e01dbf9549e1 User: Svata Dedic <sdedic@netbeans.org> Log: #254101: compound assignment cannot provide right operand as result value