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 - No "global semantics" warning when instantiating undeclared constructor function
Summary: No "global semantics" warning when instantiating undeclared constructor function
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-21 13:05 UTC by Ondrej Brejla
Modified: 2015-04-21 13:05 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 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!