This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
bug in bytecode compiler 3.3?
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: <java at gcc dot gnu dot org>
- Date: Fri, 21 Feb 2003 11:37:08 +0100
- Subject: bug in bytecode compiler 3.3?
The following code compiles (with option -C) properly to bytecode in 3.2,
but doesn't in 3.3 (on minGW):
--------------------------------------------cut-here------------------------
---------------
package mytest;
public class MyTest
{
String errorMsg;
public void fatalError(ExceptionX e)
{
errorMsg = e.toString ();
}
}
class ExceptionX extends Exception {}
--------------------------------------------cut-here------------------------
---------------
[javac] C:\devroot\tst\lib-xmlrpc-test\src\mytest/mytest.java:3: error:
Class `mytest.MyTest' already defined in C:\
devroot\tst\lib-xmlrpc-test\src\mytest\MyTest.java:3.
[javac] C:\devroot\tst\lib-xmlrpc-test\src\mytest/mytest.java:12: error:
Class `mytest.ExceptionX' already defined i
n C:\devroot\tst\lib-xmlrpc-test\src\mytest\MyTest.java:12.
The problem only occurs when the file is placed in the folder "mytest",
which has the same name as the class itself and the package, ignoring case.
If it is placed in a differently named folder, the bug disappears.
Since this kind of naming situation occurs quite frequently, it affects
quite a bit of code.