mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
539 B
Plaintext
16 lines
539 B
Plaintext
//// [tests/cases/compiler/assignmentCompatOnNew.ts] ////
|
|
|
|
=== assignmentCompatOnNew.ts ===
|
|
class Foo{};
|
|
>Foo : Symbol(Foo, Decl(assignmentCompatOnNew.ts, 0, 0))
|
|
|
|
function bar(x: {new(): Foo;}){}
|
|
>bar : Symbol(bar, Decl(assignmentCompatOnNew.ts, 0, 12))
|
|
>x : Symbol(x, Decl(assignmentCompatOnNew.ts, 2, 13))
|
|
>Foo : Symbol(Foo, Decl(assignmentCompatOnNew.ts, 0, 0))
|
|
|
|
bar(Foo); // Error, but should be allowed
|
|
>bar : Symbol(bar, Decl(assignmentCompatOnNew.ts, 0, 12))
|
|
>Foo : Symbol(Foo, Decl(assignmentCompatOnNew.ts, 0, 0))
|
|
|