Test: extending from any
This commit is contained in:
parent
765ac7ccd1
commit
650cc29219
1 changed files with 11 additions and 0 deletions
11
tests/cases/compiler/extendFromAny.ts
Normal file
11
tests/cases/compiler/extendFromAny.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
declare var Base: any;
|
||||
class C extends Base {
|
||||
known = 1;
|
||||
static sknown = 2;
|
||||
}
|
||||
|
||||
let c = new C();
|
||||
c.known.length; // error, 'real' has no 'length' property
|
||||
C.sknown.length; // error, 'sreal' has no 'length' property
|
||||
c.unknown.length; // ok, fake: any
|
||||
C.sunknown.length; // ok: sfake: any
|
Loading…
Reference in a new issue