Menu

#188 protected Java superclass field not visible

open
nobody
None
5
2007-01-14
2007-01-14
Isaac Gouy
No

Java class BufferedInputStream has a field
protected volatile byte buf[];

import java.io.*;

void main(String[] args){
(new TestStream(System.in)).test();
}

class TestStream extends BufferedInputStream {
void test(){ println(buf); }
}

$ /opt/nice-0.9.12/bin/nicec --sourcepath .. -a t.jar nicetest
nice.lang: parsing
nicetest: parsing

~/tmp/nicetest/test.nice: line 8, column 25:
buf is not declared
compilation failed with 1 error

Discussion


Log in to post a comment.