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.
In the code below the variable 'hasWheels' is marked as being 'unused' in the constructor scope and no hint to the property is produced (e.g. when typing 'redCar.' outside of it). function Car(color) { var hasWheels = true; this.color = color; this.hasWheels = hasWheels; } var redCar = new Car('red'); console.log(redCar.hasWheels);
reproducible in 8.0 and trunk
By the way, this code which I think is equivalent works fine: function Car(color) { var hasWheels = true; return { color: color, hasWheels: hasWheels }; } var redCar = new Car('red'); console.log(redCar.hasWheels);
However, it seems not to create any hints...
*** This bug has been marked as a duplicate of bug 223118 ***