14 lines
499 B
Plaintext
14 lines
499 B
Plaintext
=== tests/cases/compiler/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))
|
|
|