TypeScript/tests/baselines/reference/recursiveBaseConstructorCreation2.types
2015-04-13 14:29:37 -07:00

26 lines
955 B
Plaintext

=== tests/cases/compiler/recursiveBaseConstructorCreation2.ts ===
declare class base
>base : base, Symbol(base, Decl(recursiveBaseConstructorCreation2.ts, 0, 0))
{
}
declare class abc extends base
>abc : abc, Symbol(abc, Decl(recursiveBaseConstructorCreation2.ts, 2, 1))
>base : base, Symbol(base, Decl(recursiveBaseConstructorCreation2.ts, 0, 0))
{
foo: xyz;
>foo : xyz, Symbol(foo, Decl(recursiveBaseConstructorCreation2.ts, 4, 1))
>xyz : xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))
}
declare class xyz extends abc
>xyz : xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))
>abc : abc, Symbol(abc, Decl(recursiveBaseConstructorCreation2.ts, 2, 1))
{
}
var bar = new xyz(); // Error: Invalid 'new' expression.
>bar : xyz, Symbol(bar, Decl(recursiveBaseConstructorCreation2.ts, 11, 3))
>new xyz() : xyz
>xyz : typeof xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))