File: functionNameConflicts.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 (63 lines) | stat: -rw-r--r-- 2,569 bytes parent folder | download | duplicates (7)
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
tests/cases/conformance/functions/functionNameConflicts.ts(5,14): error TS2300: Duplicate identifier 'fn1'.
tests/cases/conformance/functions/functionNameConflicts.ts(6,9): error TS2300: Duplicate identifier 'fn1'.
tests/cases/conformance/functions/functionNameConflicts.ts(8,9): error TS2300: Duplicate identifier 'fn2'.
tests/cases/conformance/functions/functionNameConflicts.ts(9,14): error TS2300: Duplicate identifier 'fn2'.
tests/cases/conformance/functions/functionNameConflicts.ts(12,10): error TS2300: Duplicate identifier 'fn3'.
tests/cases/conformance/functions/functionNameConflicts.ts(13,5): error TS2300: Duplicate identifier 'fn3'.
tests/cases/conformance/functions/functionNameConflicts.ts(16,9): error TS2300: Duplicate identifier 'fn4'.
tests/cases/conformance/functions/functionNameConflicts.ts(17,14): error TS2300: Duplicate identifier 'fn4'.
tests/cases/conformance/functions/functionNameConflicts.ts(19,14): error TS2300: Duplicate identifier 'fn5'.
tests/cases/conformance/functions/functionNameConflicts.ts(20,9): error TS2300: Duplicate identifier 'fn5'.
tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: Function implementation name must be 'over'.


==== tests/cases/conformance/functions/functionNameConflicts.ts (11 errors) ====
    //Function and variable of the same name in same declaration space
    //Function overload with different name from implementation signature 
    
    module M {
        function fn1() { }
                 ~~~
!!! error TS2300: Duplicate identifier 'fn1'.
        var fn1;
            ~~~
!!! error TS2300: Duplicate identifier 'fn1'.
    
        var fn2;
            ~~~
!!! error TS2300: Duplicate identifier 'fn2'.
        function fn2() { }
                 ~~~
!!! error TS2300: Duplicate identifier 'fn2'.
    }
    
    function fn3() { }
             ~~~
!!! error TS2300: Duplicate identifier 'fn3'.
    var fn3;
        ~~~
!!! error TS2300: Duplicate identifier 'fn3'.
    
    function func() {
        var fn4;
            ~~~
!!! error TS2300: Duplicate identifier 'fn4'.
        function fn4() { }
                 ~~~
!!! error TS2300: Duplicate identifier 'fn4'.
    
        function fn5() { }
                 ~~~
!!! error TS2300: Duplicate identifier 'fn5'.
        var fn5;
            ~~~
!!! error TS2300: Duplicate identifier 'fn5'.
    }
    
    function over();
    function overrr() {
             ~~~~~~
!!! error TS2389: Function implementation name must be 'over'.
    
    }