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.
Created attachment 162326 [details] screenshot When anonymous functions are used, some LambdaFunctionDeclaration:**() are shown in a CC list. <?php $func1 = function(){echo "anonymous function1" . PHP_EOL;}; $func2 = function() { return function() {echo "anonymous function2" . PHP_EOL;}; }; my environments: Product Version: NetBeans IDE 8.1 (Build 201510222201) Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13 Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13 System: Linux version 4.4.0-38-generic running on amd64; UTF-8; Thanks.
Note: _Maybe_ it could be similar situation as with anonymous classes - they need to be filtered, see CodeUtils.isSyntheticTypeName() method (and its usages). Thanks.
(In reply to Tomas Mysik from comment #1) > Note: _Maybe_ it could be similar situation as with anonymous classes - they > need to be filtered, see CodeUtils.isSyntheticTypeName() method (and its > usages). I'll try to look at it later. Thanks!
Thanks! However I have no idea how exactly anonymous functions are implemented (not done by me).
Tomas, your advice was very helpful. Thanks a lot!
You are welcome, of course!
Fixed. http://hg.netbeans.org/web-main/rev/84a5dff5a88c Thanks.
The patch seems safe to me so marking it as a patch candidate. Thanks Junichi!
Integrated into 'main-silver', will be available in build *201610150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/84a5dff5a88c User: Junichi Yamamoto <junichi11@netbeans.org> Log: #268332 - CC problem for anonymous functions
Verified. Product Version: NetBeans IDE Dev (Build 20161110-5f9acf1b42b8) Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_111-b14 System: Linux version 4.8.0-27-generic running on amd64; UTF-8; cs_CZ (nb)
Transplanted to the releases repo branch release82: http://hg.netbeans.org/releases/rev/f1955b1c4d92 Thanks.
82patch1-verified