Bug 299213 - [language support] JSDT confuses static and member methods with same name
Summary: [language support] JSDT confuses static and member methods with same name
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Chris Jaun CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: needinfo
: 251373 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-10 08:46 EST by Laurens Holst CLA
Modified: 2013-06-19 11:10 EDT (History)
2 users (show)

See Also:


Attachments
Testcase (1.11 KB, text/javascript)
2010-01-10 08:46 EST, Laurens Holst CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurens Holst CLA 2010-01-10 08:46:04 EST
Created attachment 155675 [details]
Testcase

When I have a class with a static method, and a class method with the same name defined after it, a warning “The static function resolve from the type URI should be accessed in a static way” appears. The class method also doesn’t show up in the overview.

JSDT seems to think the class method is a static method. Further evidence for this can be found in the error the removeDotSegments() call inside gives: “Cannot make a static reference to the non-static function removeDotSegments() from the type URI”, which normally occurs when you try to call a class method from a static method.

If you define the class method before the static method, these errors do not occur, although then the overview does not show the presence of a resolve static method.
Comment 1 Nitin Dahyabhai CLA 2010-06-28 10:34:28 EDT
I think there's some nomenclature confusion going on here.  Class methods mean the same thing as static methods.  Did you mean constructors?
Comment 2 Nitin Dahyabhai CLA 2011-01-27 01:42:39 EST
*** Bug 251373 has been marked as a duplicate of this bug. ***