Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 275015

Summary: Errors in system.js library
Product: [WebTools] JSDT Reporter: Dan Bender <dbender>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED WORKSFORME QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun, thatnitind
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dan Bender CLA 2009-05-05 12:04:53 EDT
String function split is incorrectly modeled as returning a String; s/b Array
Array function join is modeled as returning Array, s/b String.
Global functions are modeled as prototypes of the Global object, and therefore cause validation errors if used as if they were global functions. E.g:
if(isNaN('1234')) {}
results in an undefined function error.
Comment 1 Nitin Dahyabhai CLA 2009-05-06 15:11:45 EDT

*** This bug has been marked as a duplicate of bug 259187 ***
Comment 2 Nitin Dahyabhai CLA 2009-05-06 15:14:21 EDT
Hmm, second part isn't bug 259187
Comment 3 Chris Jaun CLA 2009-05-06 17:04:52 EDT
The first problem about split function was fixed back in January. I would suggest picking up a recent 3.1m7 build. 

The second problem about isNaN is unreproducible in recent builds as well, but I'm not sure what specifically fixed that.

After picking up a new build please verify whether you still experience the second problem.

Thanks,
Chris
Comment 4 Chris Jaun CLA 2009-05-21 16:04:13 EDT
The first part of this bug about the split function was fixed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=259187 as Nitin mentioned in his comment.

The second problem about isNaN not being defined I cannot reproduce. If you see this problem in a 3.0.5 or 3.1 build please re-open.