[kaffe] KJC bug preventing Ant 1.6.0 bootstrap

Guilhem Lavaux guilhem@kaffe.org
Sat Jan 3 03:58:02 2004


This is a multi-part message in MIME format.
--------------020409000904070500000603
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Dalibor Topic wrote:

> Hi Ito, salut Guilhem,
>
> I've tried to update kaffe-extras to 1.1.3 and ant 1.6.0, and after 
> spending some time revisiting the ant bootstrap script, I failed due 
> to what seems to be a compiler bug in kjc.
>
Hi Dalibor !

I've managed to isolate the bug with the attached code. It is noticeable 
that we should put the 'try {} catch' block in the static initializer to 
get the buggy behaviour. If you put the same code in main the 
compilation will be successful.

Cheers,
Guilhem.

--------------020409000904070500000603
Content-Type: text/plain;
 name="testKJC.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="testKJC.java"

import java.io.*;

public class testKJC
{
	static public void main(String args[])
	{
	}

	static {
		Object base = null;
		
		try {
			base = new Launcher1();
		} catch (NoSuchMethodException exc) {
			System.out.println("caught");
		}
	}
	
	private static class Launcher1
	{
		public Launcher1() throws NoSuchMethodException
		{
		}
	}
}

--------------020409000904070500000603--