File: instantiateNonGenericTypeWithTypeArguments.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (37 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
=== tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts ===
// it is an error to provide type arguments to a non-generic call
// all of these are errors

class C {
>C : Symbol(C, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 0, 0))

    x: string;
>x : Symbol(C.x, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 3, 9))
}

var c = new C<number>();
>c : Symbol(c, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 7, 3))
>C : Symbol(C, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 0, 0))

function Foo(): void { }
>Foo : Symbol(Foo, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 7, 24))

var r = new Foo<number>();
>r : Symbol(r, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 10, 3))
>Foo : Symbol(Foo, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 7, 24))

var f: { (): void };
>f : Symbol(f, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 12, 3))

var r2 = new f<number>();
>r2 : Symbol(r2, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 13, 3), Decl(instantiateNonGenericTypeWithTypeArguments.ts, 17, 3))
>f : Symbol(f, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 12, 3))

var a: any;
>a : Symbol(a, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 15, 3))

// BUG 790977
var r2 = new a<number>();
>r2 : Symbol(r2, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 13, 3), Decl(instantiateNonGenericTypeWithTypeArguments.ts, 17, 3))
>a : Symbol(a, Decl(instantiateNonGenericTypeWithTypeArguments.ts, 15, 3))