Home Dashboard Directory Help
Search

Inner function will not be parsed correctly when JScript file is referenced by Nanalich


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 557534
Opened: 5/6/2010 8:20:15 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

In most cases, when you editing a jscript file and make a reference(///<reference path="..." />) to another, you will find that some inner functions always return undefined.

It seems that the HTML editor will load all script code into One appdomain; and the JScript editor will load them into two: one for the editing file itself, another for all its reference.
Details
Sign in to post a comment.
Posted by Microsoft on 10/20/2010 at 1:42 PM
Hi, Kaiyuki,

Thank you so much for the support. We are going to fix the issue in the next service pack.

Xinyang Qiu
Web Platform and Tools.
Posted by Microsoft on 5/9/2010 at 7:58 PM
Thank you for reporting this issue.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 5/7/2010 at 4:02 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Nanalich on 5/7/2010 at 2:12 AM
// test-1.js
function testImpl(f) {
function qn(n) {
    return n;
}
this[qn('$1')] = qn;
}
// test-2.js
/// <reference path="test-1.js" />
testImpl();
// test-3.js
/// <reference path="test-1.js" />
/// <reference path="test-2.js" />
var test = new testImpl();
test. // $1 showing in IntelliSense list

//========

// test-1.js
function testImpl(f) {
function qn(n) {
    return n;
}
this[qn('$1')] = qn;
}
// test-2.js
/// <reference path="test-1.js" />
var test = new testImpl();
test. // undefined showing in IntelliSense list

//========

// test-1.js
function testImpl(f) {
function qn(n) {
    return n;
}
this[qn('$1')] = qn;
}
testImpl();
// test-2.js
/// <reference path="test-1.js" />
var test = new testImpl();
test. // $1 showing in IntelliSense list

//========

// test-1.js
function testImpl(f) {
function qn(n) {
    return n;
}
this[qn('$1')] = void 0;
}
// test-2.js
/// <reference path="test-1.js" />
testImpl();
// test-3.js
/// <reference path="test-1.js" />
/// <reference path="test-2.js" />
var test = new testImpl();
test. // undefined showing in IntelliSense list

//========

// test-1.js
function testImpl(f) {
function qn(n) {
    return n;
}
this.wtf = qn;
this[qn('$1')] = void 0;
}
// test-2.js
/// <reference path="test-1.js" />
testImpl();
// test-3.js
/// <reference path="test-1.js" />
/// <reference path="test-2.js" />
var test = new testImpl();
test. // $1 showing in IntelliSense list
Posted by Nanalich on 5/6/2010 at 8:24 PM
In some cases if you call the outer function in the referenced jscript file once, the referencing one will get the correct JIT result.
But the explicit pattern is not discovered so far.
Sign in to post a workaround.