[ nice-Bugs-1060718 ] Cant access protected members of a java class
"SourceForge.net" <[email protected]> Thu, 04 Nov 2004 21:06:04 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1060718, was opened at 2004-11-04 21:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1060718&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Luc Perrin (leblin)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cant access protected members of a java class
Initial Comment:
Nice compiler version 0.9.10 prerelease, from cvs
Create a folder test, and subfolder java.
Create file test/java/A.java
---start---
package test.java;
public class A {
public A() {}
protected String getMessage() { return "Hello World!"; }
}
---end---
Create file test/test.nice
----start---
package test;
class B extends test.java.A {
void start() {
System.out.println(this.getMessage());
}
}
void main( String[] args ) {
B b = new B( );
b.start();
}
---end---
Compile:
javac test/java/A.java
nicec test
test.nice: line 6, column 36:
Method java.lang.String test.java.A.getMessage() is not
accessible
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1060718&group_id=12788
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click