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.

Bug 269253 - static checked syntax error not detected
Summary: static checked syntax error not detected
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 17:21 UTC by FiruzzZ
Modified: 2017-05-04 11:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (840.57 KB, text/plain)
2016-12-06 17:22 UTC, FiruzzZ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FiruzzZ 2016-12-06 17:21:34 UTC
Inside the If statement there a RETURN FALSE, which just should be RETURN, the IDE doesn't detect the "bad return" until it is compiled.
There is no RED error highlighted in that row neither adobe or below.


abm.getBtnAceptar().addActionListener(evt -> {
            if (JOptionPane.YES_OPTION
                    != JOptionPane.showConfirmDialog(abm, "Confirmar acreditación: $" + panelABM.getTxtTotal().getText() + " a " + delegacion.getNombre(),
                            "Acreditar Dinero", JOptionPane.YES_NO_OPTION)) {
                return false;
            }
 ..........
 ..........
});

Compiling error:  error: incompatible types: bad return type in lambda expression
                return false;
    unexpected return value


Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_112
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.112-b15

Reproducibility: Happens every time
Comment 1 FiruzzZ 2016-12-06 17:22:03 UTC
Created attachment 163170 [details]
IDE log
Comment 2 Dusan Balek 2017-05-04 11:28:58 UTC
Already fixed in dev build.

http://hg.netbeans.org/main/nb-javac/rev/848eced2ad34