TypeScript/tests/baselines/reference/recursiveBaseConstructorCreation2.types

26 lines
955 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/recursiveBaseConstructorCreation2.ts ===
declare class base
2015-04-13 23:01:57 +02:00
>base : base, Symbol(base, Decl(recursiveBaseConstructorCreation2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
{
}
declare class abc extends base
2015-04-13 23:01:57 +02:00
>abc : abc, Symbol(abc, Decl(recursiveBaseConstructorCreation2.ts, 2, 1))
>base : base, Symbol(base, Decl(recursiveBaseConstructorCreation2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
{
foo: xyz;
2015-04-13 23:01:57 +02:00
>foo : xyz, Symbol(foo, Decl(recursiveBaseConstructorCreation2.ts, 4, 1))
>xyz : xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))
2014-08-15 23:33:16 +02:00
}
declare class xyz extends abc
2015-04-13 23:01:57 +02:00
>xyz : xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))
>abc : abc, Symbol(abc, Decl(recursiveBaseConstructorCreation2.ts, 2, 1))
2014-08-15 23:33:16 +02:00
{
}
var bar = new xyz(); // Error: Invalid 'new' expression.
2015-04-13 23:01:57 +02:00
>bar : xyz, Symbol(bar, Decl(recursiveBaseConstructorCreation2.ts, 11, 3))
2014-08-15 23:33:16 +02:00
>new xyz() : xyz
2015-04-13 23:01:57 +02:00
>xyz : typeof xyz, Symbol(xyz, Decl(recursiveBaseConstructorCreation2.ts, 6, 1))
2014-08-15 23:33:16 +02:00