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 250338 - Code completion for anonymous module in inner scope
Summary: Code completion for anonymous module in inner scope
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-10 12:30 UTC by Vladimir Riha
Modified: 2015-04-04 05:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (26.21 KB, application/zip)
2015-02-10 12:31 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2015-02-10 12:30:29 UTC
Please check the attached project and:
 - open modex/cc/cc15.js
 - on line 85, type:

require("../../complexModule").

  => cc does not offer exported stuff from "complexModule", it works fine in file's global context.


The same problem happens if it is invoked in either one of the following snippets


exports.registerRoute = function (app) {
    app.get("/api/:id", function (req, res) {
require("../../complexModule").
})};


or

exports.foobar = function(){
require("../../complexModule").
}



Thank you



Product Version: NetBeans IDE Dev (Build 201502090001)
Java: 1.7.0_75; Java HotSpot(TM) Client VM 24.75-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_75-b13
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2015-02-10 12:31:16 UTC
Created attachment 151921 [details]
sample project
Comment 2 Petr Pisl 2015-04-03 08:27:21 UTC
Fixed in web-main.
Comment 3 Quality Engineering 2015-04-04 05:16:17 UTC
Integrated into 'main-silver', will be available in build *201504040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1bcc22636d11
User: Petr Pisl <ppisl@netbeans.org>
Log: #250338 - Code completion for anonymous module in inner scope