Loosen Constructor super()/this() call restrictions
Mark Mahieu
markmahieu at googlemail.com
Sun Mar 22 18:14:43 PDT 2009
2009/3/23 Jeremy Manson <jeremy.manson at gmail.com>
>
> Also, it seems to me that you would want to be careful about access to
> fields of the parent object before the invocation of super().
>
> Jeremy
>
Yes, which implies no calls to other instance methods, or to static methods
passing 'this' as an argument etc. Maybe a simple rule to build upon would
be to say that anything before the call to this() or super() is effectively
in a static context (ie no references to instance members, or to this/super,
are allowed). There'd be more to it than that though.
Also (Mike) there's at least one existing bug entry for this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4093999
Mark
More information about the coin-dev
mailing list