kaffe javac question: forward reference supported?
Yong Chen
kaffe@rufus.w3.org
Tue, 10 Apr 2001 19:02:38 -0700
Hi,
thank you very much for the reply, it did help me to some extent. But
unfortunately I'm still facing a problem which is related to my previous
question. I tried to compile 2 classes (each references the other) at same
time (like: kjc A.java B.java) but got exception (see below). This happens
when these 2 classes are in same package, also happens when these 2 classes
are in different packages.
Any help is appreciated.
Yong Chen
java.lang.ClassCastException: can't cast `at/dms/kjc/CMethodContext' to
`at/dms/kjc/CBodyContext'
at at.dms.kjc.CBlockContext.getVariableInfo(CBlockContext.java:169)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:26
4)
at at.dms.kjc.CBlockContext.getVariableInfo(CBlockContext.java:169)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:26
4)
at at.dms.kjc.CBlockContext.getVariableInfo(CBlockContext.java:169)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:25
9)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:25
9)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:26
4)
at at.dms.kjc.CBlockContext.getVariableInfo(CBlockContext.java:169)
at
at.dms.kjc.CAbstractBodyContext.getVariableInfo(CAbstractBodyContext.java:26
4)
at at.dms.kjc.CBodyContext.merge(CBodyContext.java:125)
at at.dms.kjc.JLoopStatement.addBreak(JLoopStatement.java:76)
at
at.dms.kjc.JBreakStatement.checkStatement(JBreakStatement.java:66)
at at.dms.kjc.JStatement.checkBody(JStatement.java:56)
at at.dms.kjc.JBlock.checkStatement(JBlock.java:73)
at at.dms.kjc.JStatement.checkBody(JStatement.java:56)
at at.dms.kjc.JIfStatement.checkStatement(JIfStatement.java:76)
at at.dms.kjc.JStatement.checkBody(JStatement.java:56)
at
at.dms.kjc.JCompoundStatement.checkStatement(JCompoundStatement.java:61)
at at.dms.kjc.JForStatement.checkStatement(JForStatement.java:106)
at at.dms.kjc.JStatement.checkBody(JStatement.java:56)
at at.dms.kjc.JBlock.checkStatement(JBlock.java:73)
at
at.dms.kjc.JMethodDeclaration.checkStatement(JMethodDeclaration.java:173)
at
at.dms.kjc.JClassDeclaration.checkTypeBody(JClassDeclaration.java:245)
at at.dms.kjc.JCompilationUnit.checkBody(JCompilationUnit.java:167)
at at.dms.kjc.Main.checkBody(Main.java:340)
at at.dms.kjc.Main.run(Main.java:123)
at at.dms.kjc.Main.compile(Main.java:255)
at at.dms.kjc.Main.main(Main.java:246)
-----Original Message-----
From: Edouard G. Parmelan [mailto:egp@free.fr]
Sent: Monday, April 09, 2001 11:23 PM
To: Yong Chen
Cc: 'kaffe@rufus.w3.org'
Subject: Re: kaffe javac question: forward reference supported?
Yong Chen wrote:
> Say I have a class A having reference to class B, and class B having
> reference to class A, based on Java spec, this is allowed, but kaffe's
> javac (kjc) just doesn't allow me to compile either A or B.
Current version (1.4F and 1.4F-egp*) of KJC (KOPI Java Compiler) does
not support this feature. As a workaround, you must compile classes A
and B in the same run as in
kjc A.java B.java
--
Edouard G. Parmelan
http://egp.free.fr