Inheritance
tronicek at fel.cvut.cz
tronicek at fel.cvut.cz
Fri May 16 00:32:23 PDT 2008
Hi,
this is compilable:
interface J1 {
Integer invoke();
}
interface J2 {
Number invoke();
}
interface J3 {
Object invoke();
}
interface J4 extends J1, J2, J3 { }
class C3 implements J1, J2, J3 {
public Integer invoke() { return null; }
}
class C4 implements J4 {
public Integer invoke() { return null; }
}
and this is not:
interface I1 extends { => Integer } { }
interface I2 extends { => Number } { }
interface I3 extends { => Object } { }
interface I4 extends I1, I2, I3 { }
class C1 implements I1, I2, I3 {
public Integer invoke() { return null; }
}
class C2 implements I4 {
public Integer invoke() { return null; }
}
But probably should be. As well as this:
interface Simple extends { => Integer }, { => Number }, { => Object } { }
Zdenek
--
Zdenek Tronicek
Department of Computer Science and Engineering
Prague tel: +420 2 2435 7410
http://cs.felk.cvut.cz/~tronicek
More information about the closures-dev
mailing list