Summary: | [1.5] No error on invalid static import declaration | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Frederic Fusier
2004-10-14 07:54:56 EDT
Oooops, in fact compiler reports errors on comment 0 syntax: - unused import - out unresolved Syntax which does not provide any error is: import static java.lang.System; public class X { public static void main (String[] args) { System.out.println("SUCCESS"); } } On comment 1 syntax, javac reports following errors: X.java:1: cannot find symbol symbol : class lang location: package java import static java.lang.System; ^ X.java:1: static import only from classes and interfaces import static java.lang.System; ^ 2 errors Fixed. Added StaticImportTest.test008(). Verified for 3.1M3 with build I20041102 |