[ nice-Bugs-1060712 ] Need access checks when extending java classes
"SourceForge.net" <[email protected]> Tue, 23 Nov 2004 08:25:38 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1060712, was opened at 2004-11-04 20:56
Message generated for change (Settings changed) made by leblin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1060712&group_id=12788
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Luc Perrin (leblin)
Assigned to: Nobody/Anonymous (nobody)
Summary: Need access checks when extending java classes
Initial Comment:
Nice compiler version 0.9.10 prerelease, from cvs
How to reproduce
1. create a java class in one package that is not public
2. extend the java class in a nice class in a different
package
The compiler will tell you that your nice class has no
constructor. The compiler should state that the class
can not be extended because it is not available from
this package.
In addition, if the java class is public but no
constructors in the java class are public, the compiler
will tell you that your nice class has no constructor.
In this case, the compiler should state that no
constructors in the super class are available from this
package.
i posted this as a bug instead of in the
BadErrorMessages wiki page because these errors message
are very misleading.
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-11-06 03:31
Message:
Logged In: YES
user_id=688815
I applied both patches to CVS. (after style modifications)
----------------------------------------------------------------------
Comment By: Luc Perrin (leblin)
Date: 2004-11-05 22:38
Message:
Logged In: YES
user_id=717201
i have attached a cummulative patch for ClassDefinition
which makes all nice classes public by default, since we do
not have visibility modifiers yet. The current access level
is package.
This change will make bootstrapping possible.
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-11-05 07:48
Message:
Logged In: YES
user_id=88952
OK, I could apply the patch. Positive points: you seem to
have understood the structure, putting methods in the right
places. And it does give the right error message.
In the future, please try to follow the conventions of the
rest of the code. We all have our preferences, but some
harmony helps (for instance if (...) , and { on separate
lines. also, be careful of extra whitespaces, which should
be avoided).
The problem is that as it is the patch prevents bootstrap
(make world). I suspect this is revealing a problem
somewhere else, not your fault. I'll investigate later...
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-11-05 06:29
Message:
Logged In: YES
user_id=88952
Luc, thanks for these reports, it was a good idea to put
them here. I've just written a commited a testcase for the
second situation. I'm now looking at your patch for the
first one (for some reason the patch did not apply cleanly,
so that will need some hand-made tweaking).
----------------------------------------------------------------------
Comment By: Luc Perrin (leblin)
Date: 2004-11-05 00:28
Message:
Logged In: YES
user_id=717201
The attached patch fixes the first case.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1060712&group_id=12788
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/