Bug 81706 - [1.5] Static import of static method produces compile error
Summary: [1.5] Static import of static method produces compile error
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 82728 83275 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-20 22:46 EST by Glenn Burgess CLA
Modified: 2005-02-16 06:16 EST (History)
4 users (show)

See Also:


Attachments
Adds test for static import of java.lang.Math.abs method to org.eclipse.jdt.core.tests.compiler.regression.StaticImportTest (920 bytes, patch)
2004-12-20 22:56 EST, Glenn Burgess CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Burgess CLA 2004-12-20 22:46:20 EST
eg.
static import java.lang.Math.max;

Compiler reports:
The import java.lang.Math.max cannot be resolved

This is however a legal use of static import.
Comment 1 Glenn Burgess CLA 2004-12-20 22:56:06 EST
Created attachment 16782 [details]
Adds test for static import of java.lang.Math.abs method to org.eclipse.jdt.core.tests.compiler.regression.StaticImportTest
Comment 2 Kent Johnson CLA 2004-12-28 09:50:32 EST
As a work around, please use:

static import java.lang.Math.*;
Comment 3 Kent Johnson CLA 2004-12-29 09:33:41 EST
*** Bug 81593 has been marked as a duplicate of this bug. ***
Comment 4 Kent Johnson CLA 2004-12-29 09:34:35 EST
*** Bug 81470 has been marked as a duplicate of this bug. ***
Comment 5 Kent Johnson CLA 2004-12-30 09:39:44 EST
*** Bug 81593 has been marked as a duplicate of this bug. ***
Comment 6 Kent Johnson CLA 2004-12-30 09:41:10 EST
*** Bug 81470 has been marked as a duplicate of this bug. ***
Comment 7 Kent Johnson CLA 2005-01-12 15:02:39 EST
enabled rest of StaticImport test012
Comment 8 Kent Johnson CLA 2005-01-13 10:16:32 EST
*** Bug 82728 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2005-01-20 10:12:15 EST
*** Bug 83275 has been marked as a duplicate of this bug. ***
Comment 10 David Audel CLA 2005-02-16 06:16:31 EST
Verified in I20050215-2300