Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSDT: types scoping differs from browsers
JSDT: types scoping differs from browsers [message #209764] Thu, 06 March 2008 06:05 Go to previous message
Eclipse User
Originally posted by: anton.safonov.gmail.com

Hi all!

Posted this to ATF first, but it might be more appropriate here.

I noticed that JSDT (tried both autumn versions and latest tags) handles
type scopes differently when compared with Firefox/IE.
Let's have such a script:
function aaa() {
var localvar = 1;
globalvar = 2;
function myclass() {
myclass.prototype.mymethod = function() {
// assist here
}
}
}

Inside the "mymethod" "localvar" is visible in the browser, but not
visible in JSDT. As far as I've found, the reason is that once there is a
'prototype' mentioned, InferEngine starts working and marks "myclass" as
an inferred type and puts its scope right under CompilationUnitScope, not
under the scope of the "aaa" function.

Is it an expected behavior and based on some standard or it is more like a
bug?
What would be the easiest "fix" for my custom build to work the way
browsers do?

Regards,
Anton Safonov
 
Read Message
Read Message
Previous Topic:EMF XSD Parser Bug for SimpleType Definition in case of List and Union
Next Topic:War Import
Goto Forum:
  


Current Time: Tue May 21 15:49:56 EDT 2013

Powered by FUDForum. Page generated in 0.01786 seconds