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 251967

Summary: No "global semantics" warning when instantiating undeclared constructor function
Product: javascript Reporter: Ondrej Brejla <obrejla>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Ondrej Brejla 2015-04-21 13:05:27 UTC
Imagine this snippet:

define([
], function() {
    var foo = new Foo();
});

Foo() is not violet even though Foo is not declared anywhere in a file. 

Imho it should have some "semantic" marker to be clear, that someone tries to instantiate "global/undeclared" thing. 

Because it is just a mistake in most cases and someone just forgot to declare/import right constructor function ;) Thanks a lot!