Nick Fortescue - 2001-11-05

Logged In: YES
user_id=251678

Clarification: This is a defect when using the compiler in
an embedded form, the command line compiler still works
fine.

Summary of reason for problem:
In fixing defect #476765, (commandline classpath)
setClassReader was moved out of Main.init() into Main.main
(). setClassReader also does Type.init(), as this has to be
done after initialising the class reader. This means for
embedded code you have to now call Type.init() or
main.setClassReader() yourself.

This could be changed, but at the moment I don't think it
is incorrect behaviour. What do you think? To get the above
code to work we have two obvious options:

1) In compile check if a classreader has been set, if it
hasn't do a setClassReader line. This would change main and
make this code work silently.

2) Insist that the above code has a
setClassReader(new ClassReader(null, null));
after the Main.init() line.