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 241640 - Objects in a function inside with block
Summary: Objects in a function inside with block
Status: RESOLVED FIXED
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: 239109
  Show dependency tree
 
Reported: 2014-02-10 13:28 UTC by Petr Pisl
Modified: 2014-02-11 02:54 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 Petr Pisl 2014-02-10 13:28:30 UTC
Have a code:

var ironman = {
    name: "Hejlik",
    date: new Date()
}

with (ironman) {
    date.getMonth();
    !(function( ) {
        date.getYear();  
    })();
}

the expression date.getYear() is resolved in wrong way. The object date is treated as global variable.
Comment 1 Petr Pisl 2014-02-10 13:50:52 UTC
Fixed in web-main.
Comment 2 Quality Engineering 2014-02-11 02:54:58 UTC
Integrated into 'main-silver', will be available in build *201402110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dbd0a4ff6b32
User: Petr Pisl <ppisl@netbeans.org>
Log: #241640 - Objects in a function inside with block