File: augmentedTypesVar.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (78 lines) | stat: -rw-r--r-- 3,071 bytes parent folder | download | duplicates (2)
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
69
70
71
72
73
74
75
76
77
78
tests/cases/compiler/augmentedTypesVar.ts(6,5): error TS2300: Duplicate identifier 'x2'.
tests/cases/compiler/augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'.
tests/cases/compiler/augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'x3' must be of type 'number', but here has type '() => void'.
tests/cases/compiler/augmentedTypesVar.ts(13,5): error TS2300: Duplicate identifier 'x4'.
tests/cases/compiler/augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'.
tests/cases/compiler/augmentedTypesVar.ts(16,5): error TS2300: Duplicate identifier 'x4a'.
tests/cases/compiler/augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'.
tests/cases/compiler/augmentedTypesVar.ts(20,5): error TS2300: Duplicate identifier 'x5'.
tests/cases/compiler/augmentedTypesVar.ts(21,6): error TS2300: Duplicate identifier 'x5'.
tests/cases/compiler/augmentedTypesVar.ts(27,5): error TS2300: Duplicate identifier 'x6a'.
tests/cases/compiler/augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'.
tests/cases/compiler/augmentedTypesVar.ts(30,5): error TS2300: Duplicate identifier 'x6b'.
tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'.


==== tests/cases/compiler/augmentedTypesVar.ts (13 errors) ====
    // var then var
    var x1 = 1;
    var x1 = 2;
    
    // var then function
    var x2 = 1; // error
        ~~
!!! error TS2300: Duplicate identifier 'x2'.
    function x2() { } // error
             ~~
!!! error TS2300: Duplicate identifier 'x2'.
    
    var x3 = 1; 
    var x3 = () => { } // error
        ~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'x3' must be of type 'number', but here has type '() => void'.
    
    // var then class
    var x4 = 1; // error
        ~~
!!! error TS2300: Duplicate identifier 'x4'.
    class x4 { } // error
          ~~
!!! error TS2300: Duplicate identifier 'x4'.
    
    var x4a = 1; // error
        ~~~
!!! error TS2300: Duplicate identifier 'x4a'.
    class x4a { public foo() { } } // error
          ~~~
!!! error TS2300: Duplicate identifier 'x4a'.
    
    // var then enum
    var x5 = 1;
        ~~
!!! error TS2300: Duplicate identifier 'x5'.
    enum x5 { One } // error
         ~~
!!! error TS2300: Duplicate identifier 'x5'.
    
    // var then module
    var x6 = 1;
    module x6 { } // ok since non-instantiated
    
    var x6a = 1; // error
        ~~~
!!! error TS2300: Duplicate identifier 'x6a'.
    module x6a { var y = 2; } // error since instantiated
           ~~~
!!! error TS2300: Duplicate identifier 'x6a'.
    
    var x6b = 1; // error
        ~~~
!!! error TS2300: Duplicate identifier 'x6b'.
    module x6b { export var y = 2; } // error
           ~~~
!!! error TS2300: Duplicate identifier 'x6b'.
    
    // var then import, messes with other error reporting
    //var x7 = 1;
    //import x7 = require('');