On Tue, 24 Nov 2009 14:55:44 +0300, Long Chang <[email protected]>
wrote:
public interface Listener {
void handleEvent (int);
}
void main(){
void print(int evt){
}
Listener listener = new class() Listener {
public void handleEvent(int evt) {
.print(evt);
}
};
}
-----------------------------------------------------------------------------------
x.d(20): Error: undefined identifier module x.print
x.d(20): Error: function expected before (), not module x.print of type
void
Try removing a dot before print.
As is, it searches for a print function at a global scope, fails to find
one and shows an error.
I'm not sure it is a proper behavior, though. Try creating a bugzilla
report.