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.
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
                {
                }
        }
}

Reply via email to