This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Class in same Package not valid type | ||
---|---|---|---|
Product: | java | Reporter: | bht <bht> |
Component: | Compiler | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Test case in zip file
Screen shot of hint package stmt commented out Projects window - no error |
Created attachment 136508 [details]
Screen shot of hint
The package statement in Gee1Leg.java is commented out (can't remember that I did that). However, in my current installation in the projects window, the file is not marked erroneous. Created attachment 136511 [details]
package stmt commented out
Created attachment 136512 [details]
Projects window - no error
For the record: the only bug here is that a compile-time error is not reported in a specific case. The easiest way to reproduce is this: ----Test.java package test; public Test { java.util.List<A> l; } ----A.java ---- (Note that it is not a compile time error not to have the Java source files in the correct package structure.) Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1. |
Created attachment 136507 [details] Test case in zip file Product Version: NetBeans IDE 7.3 (Build 201306052037) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17 System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb) In the attached Maven project, a missing import in a Java class cannot be fixed via the hint. The hint shows the message that results from the missing import in a way: The type of get(int) is erroneous where E is a type-variable: E extends Object declared in interface List --- (Alt+Enter shows hints) and when pressing Alt+Enter: "Split into declaration and assignment"