38 lines
548 B
TypeScript
38 lines
548 B
TypeScript
|
class B1 {
|
||
|
public x;
|
||
|
}
|
||
|
|
||
|
class B2 {
|
||
|
public x;
|
||
|
}
|
||
|
|
||
|
class C extends B1, B2 { // duplicate member
|
||
|
}
|
||
|
|
||
|
class D1 extends B1 {
|
||
|
}
|
||
|
|
||
|
class D2 extends B2 {
|
||
|
}
|
||
|
|
||
|
class E extends D1, D2 { // nope, duplicate member
|
||
|
}
|
||
|
|
||
|
class N {
|
||
|
public y:number;
|
||
|
}
|
||
|
|
||
|
class ND extends N { // any is assignable to number
|
||
|
public y;
|
||
|
}
|
||
|
|
||
|
class Good {
|
||
|
public f:() => number = function() { return 0; }
|
||
|
public g() { return 0; }
|
||
|
}
|
||
|
|
||
|
class Baad extends Good {
|
||
|
public f(): number { return 0; }
|
||
|
public g(n:number) { return 0; }
|
||
|
}
|