Bug 35594 - antlr.LLkParser fails as superclass in Eclipse 2.1, javac works
Summary: antlr.LLkParser fails as superclass in Eclipse 2.1, javac works
Status: RESOLVED DUPLICATE of bug 21661
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-24 14:22 EST by Chris Bailey CLA
Modified: 2003-06-02 06:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bailey CLA 2003-03-24 14:22:11 EST
The one line file: public class Foo extends antrl.LLkParser { Foo() { super
(0); } }
compiles with JAVAC: javac -classpath .;antlr.jar Foo.java
But does not compile with Eclipse even though antlr.jar is in the project 
classpath.

Complete reproduction scenario:

File->New Java Project "antlrbug"
Right MouseButton->New Folder "lib"
Copy antlr.jar (http://www.antlr.org) into /lib
Refresh, File->Project Properties
Right MouseButton->Properties->Libraries->Add JARs->select "antlr.jar"
Right MouseButton->New Class
  Name: "AntlrBug"
  Super Class: Select LLkParser
  Generate inherited constructors
Now Eclipse has a file it cannot compile, error message
 "The compilation unit indirectly references the missing type 
antlr.debug.TraceListener
  (typically some required class file is referencing a type outside the 
classpath"
   
It's as if Eclipse has an older version of antlr.jar in its plugins so 
the "auto-compilation" fails.

What an Open-Source compiler writer to do when using an Open-Source IDE :-)

Thanks,

Chris
Comment 1 Philipe Mulet CLA 2003-03-25 05:30:27 EST
Reproduced
Comment 2 Philipe Mulet CLA 2003-03-25 06:22:34 EST
When we check inherited methods from antlr.Parser
void removeTraceListener(antlr.debug.TraceListener) 
we fail to bind antlr.debug.TraceListener.

Other compilers seem to ignore this missing type, since the 
#removeTraceListener isn't considered in the compilation process.

We could be somewhat more lazy and not resolved these methods unless they are 
relevant to the sources we are compiling (overriden, abstract etc...).

Post 2.1
Comment 3 Kent Johnson CLA 2003-03-25 10:13:19 EST
Same issue as bug 21661.

To fix, we need to ask for inherited methods named the same as the current type 
& all abstract methods which need to be overridden... plus some other 
categories likely.

It will slow down the method verifier.

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