next up previous contents index
Next: on statements Up: Explicit constructor invocation statements Previous: Explicit constructor invocation statements   Contents   Index

Note Added.

It now appears that in the JDK reference implementation of Java the interpretation of ``static context'' for a general expression in an explicit constructor invocation is different to the static context experienced in the body of an anonymous class instance creation expression embedded in an explicit constructor invocation. General expressions can (sometimes, under precise conditions we don't clearly understand) access enclosing instances, whereas a special rule says specifically that anonymous class instance creation expressions embedded in explicit constructor invocations can not. So the above translation will not work if the original explicit constructor invocation contains a legitimate (?) reference to an enclosing instance. The correct rules for static context in inner classes are not very clear to us, and for now the HPJava translator follows scheme described above. With significant extra work, other interpretations of the static context can be accomodated.



Bryan Carpenter 2003-04-15