File: nameCollisions.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (93 lines) | stat: -rw-r--r-- 3,792 bytes parent folder | download | duplicates (3)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
tests/cases/compiler/nameCollisions.ts(2,9): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/nameCollisions.ts(4,12): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/nameCollisions.ts(10,12): error TS2300: Duplicate identifier 'z'.
tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'.
tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
tests/cases/compiler/nameCollisions.ts(24,9): error TS2300: Duplicate identifier 'f'.
tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'.
tests/cases/compiler/nameCollisions.ts(27,14): error TS2300: Duplicate identifier 'f2'.
tests/cases/compiler/nameCollisions.ts(28,9): error TS2300: Duplicate identifier 'f2'.
tests/cases/compiler/nameCollisions.ts(33,11): error TS2813: Class declaration cannot implement overload list for 'C'.
tests/cases/compiler/nameCollisions.ts(34,14): error TS2814: Function with bodies can only merge with classes that are ambient.
tests/cases/compiler/nameCollisions.ts(36,14): error TS2814: Function with bodies can only merge with classes that are ambient.
tests/cases/compiler/nameCollisions.ts(37,11): error TS2813: Class declaration cannot implement overload list for 'C2'.


==== tests/cases/compiler/nameCollisions.ts (13 errors) ====
    module T {
        var x = 2;
            ~
!!! error TS2300: Duplicate identifier 'x'.
    
        module x { // error
               ~
!!! error TS2300: Duplicate identifier 'x'.
            export class Bar {
                test: number;
            }
        }
    
        module z {
               ~
!!! error TS2300: Duplicate identifier 'z'.
            var t;
        }
        var z; // error
            ~
!!! error TS2300: Duplicate identifier 'z'.
    
        module y {
               ~
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
            var b;
        }
    
        class y { } // error
    
        var w;
        module w { } //ok
    
        var f;
            ~
!!! error TS2300: Duplicate identifier 'f'.
        function f() { } //error
                 ~
!!! error TS2300: Duplicate identifier 'f'.
    
        function f2() { }
                 ~~
!!! error TS2300: Duplicate identifier 'f2'.
        var f2; // error
            ~~
!!! error TS2300: Duplicate identifier 'f2'.
    
        var i;
        interface i { } //ok
    
        class C { }
              ~
!!! error TS2813: Class declaration cannot implement overload list for 'C'.
!!! related TS6506 tests/cases/compiler/nameCollisions.ts:33:11: Consider adding a 'declare' modifier to this class.
        function C() { } // error
                 ~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 tests/cases/compiler/nameCollisions.ts:33:11: Consider adding a 'declare' modifier to this class.
    
        function C2() { }
                 ~~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 tests/cases/compiler/nameCollisions.ts:37:11: Consider adding a 'declare' modifier to this class.
        class C2 { } // error
              ~~
!!! error TS2813: Class declaration cannot implement overload list for 'C2'.
!!! related TS6506 tests/cases/compiler/nameCollisions.ts:37:11: Consider adding a 'declare' modifier to this class.
    
        function fi() { }
        interface fi { } // ok
    
        class cli { }
        interface cli { }
    
        interface cli2 { }
        class cli2 { }
    }