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 233373 - Inner with block is not handled correctly
Summary: Inner with block is not handled correctly
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks: 232144
  Show dependency tree
 
Reported: 2013-07-25 07:54 UTC by Petr Pisl
Modified: 2013-08-13 12:46 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 2013-07-25 07:54:16 UTC
Have this code:

/**
 * @constructor
 * @returns {Man}
 */
function Man (fName, sName) {
    var firstName = fName;
    var secondName = sName;
    
    this.getFirstName = function () {
        return firstName;
    }
    
    this.getSecondName = function () {
        return secondName;
    }
    
    this.address = {
        street: "unknown street",
        city: "some town",
        zip: "15000",
        print : function () {
            return "Address: " + this.street + ", " + this.city + ", " + this.zip; 
        }
    };
    
    
}

var martin = new Man("Martin", "Chloupek");

with(martin) {
    console.log(getFirstName());
    address.city = "Pribram";
    with (address) {
        console.log(city);
        city = "Podlesi";
    }
}

console.log(martin.address.city);

the innner with block is not colored correctly and also the mark occurrences don't work
Comment 1 Petr Pisl 2013-08-13 12:46:18 UTC
Added to the web-main in the change: http://hg.netbeans.org/web-main/rev/5cbdcccf7a98