Bug 85870 - Eclipse compiler won't detect invalid code when using 5.0 compliance level
Summary: Eclipse compiler won't detect invalid code when using 5.0 compliance level
Status: RESOLVED DUPLICATE of bug 81971
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-18 15:25 EST by Max Gilead CLA
Modified: 2005-02-18 16:11 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Gilead CLA 2005-02-18 15:25:45 EST
This invalid code:

public class VoidTest
  {
  void b(Object o) {}
  void a() { b(a()); }
  }

compiles fine in Eclipse when using 5.0 compliance level. Javac gives this error:

javac -source 1.5 -target 1.5 VoidTest.java
VoidTest.java:6: 'void' type not allowed here
        b(a());
           ^
1 error


Eclipse 3.1M4 Linux/GTK
Comment 1 Philipe Mulet CLA 2005-02-18 16:11:34 EST

*** This bug has been marked as a duplicate of 81971 ***