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 233517 - Incorrectly inserted '{' in boolean expression
Summary: Incorrectly inserted '{' in boolean expression
Status: RESOLVED DUPLICATE of bug 233292
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-26 20:16 UTC by everflux
Modified: 2013-07-29 06:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2013-07-26 20:16:05 UTC
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
Comment 1 Vladimir Riha 2013-07-29 06:11:22 UTC
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 ***