File: augmentedTypesVar.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 (68 lines) | stat: -rw-r--r-- 2,147 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
=== tests/cases/compiler/augmentedTypesVar.ts ===
// var then var
var x1 = 1;
>x1 : Symbol(x1, Decl(augmentedTypesVar.ts, 1, 3), Decl(augmentedTypesVar.ts, 2, 3))

var x1 = 2;
>x1 : Symbol(x1, Decl(augmentedTypesVar.ts, 1, 3), Decl(augmentedTypesVar.ts, 2, 3))

// var then function
var x2 = 1; // error
>x2 : Symbol(x2, Decl(augmentedTypesVar.ts, 5, 3))

function x2() { } // error
>x2 : Symbol(x2, Decl(augmentedTypesVar.ts, 5, 11))

var x3 = 1; 
>x3 : Symbol(x3, Decl(augmentedTypesVar.ts, 8, 3), Decl(augmentedTypesVar.ts, 9, 3))

var x3 = () => { } // error
>x3 : Symbol(x3, Decl(augmentedTypesVar.ts, 8, 3), Decl(augmentedTypesVar.ts, 9, 3))

// var then class
var x4 = 1; // error
>x4 : Symbol(x4, Decl(augmentedTypesVar.ts, 12, 3))

class x4 { } // error
>x4 : Symbol(x4, Decl(augmentedTypesVar.ts, 12, 11))

var x4a = 1; // error
>x4a : Symbol(x4a, Decl(augmentedTypesVar.ts, 15, 3))

class x4a { public foo() { } } // error
>x4a : Symbol(x4a, Decl(augmentedTypesVar.ts, 15, 12))
>foo : Symbol(x4a.foo, Decl(augmentedTypesVar.ts, 16, 11))

// var then enum
var x5 = 1;
>x5 : Symbol(x5, Decl(augmentedTypesVar.ts, 19, 3))

enum x5 { One } // error
>x5 : Symbol(x5, Decl(augmentedTypesVar.ts, 19, 11))
>One : Symbol(x5.One, Decl(augmentedTypesVar.ts, 20, 9))

// var then module
var x6 = 1;
>x6 : Symbol(x6, Decl(augmentedTypesVar.ts, 23, 3), Decl(augmentedTypesVar.ts, 23, 11))

module x6 { } // ok since non-instantiated
>x6 : Symbol(x6, Decl(augmentedTypesVar.ts, 23, 3), Decl(augmentedTypesVar.ts, 23, 11))

var x6a = 1; // error
>x6a : Symbol(x6a, Decl(augmentedTypesVar.ts, 26, 3))

module x6a { var y = 2; } // error since instantiated
>x6a : Symbol(x6a, Decl(augmentedTypesVar.ts, 26, 12))
>y : Symbol(y, Decl(augmentedTypesVar.ts, 27, 16))

var x6b = 1; // error
>x6b : Symbol(x6b, Decl(augmentedTypesVar.ts, 29, 3))

module x6b { export var y = 2; } // error
>x6b : Symbol(x6b, Decl(augmentedTypesVar.ts, 29, 12))
>y : Symbol(y, Decl(augmentedTypesVar.ts, 30, 23))

// var then import, messes with other error reporting
//var x7 = 1;
//import x7 = require('');