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.
Product Version: NetBeans IDE Dev (Build 201307252300) Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 Given javascript this.getBuyer = function() { return this.buyer ##cursor here## } I type || {name: "foo"} Netbeans "completes" to this.getBuyer = function() { return this.buyer || {name: "foo"}{ } And immediately marks it as an error. What I wanted to type instead this.getBuyer = function() { return this.buyer || {name: "foo"}; } Netbeans should not add an opening curly brace in this case
Likely fixed by fixing issue 233292, I cannot reproduce it now. Please try newer build, it should be OK. Product Version: NetBeans IDE Dev (Build 201307282300) Java: 1.7.0_40-ea; Java HotSpot(TM) Client VM 24.0-b52 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b33 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb) *** This bug has been marked as a duplicate of bug 233292 ***