File: callOverloads2.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 203,960 kB
  • sloc: sh: 11; makefile: 5
file content (49 lines) | stat: -rw-r--r-- 1,942 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
tests/cases/compiler/callOverloads2.ts(3,7): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads2.ts(11,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'.
tests/cases/compiler/callOverloads2.ts(13,10): error TS2393: Duplicate function implementation.
tests/cases/compiler/callOverloads2.ts(14,10): error TS2393: Duplicate function implementation.
tests/cases/compiler/callOverloads2.ts(16,10): error TS2391: Function implementation is missing or not immediately following the declaration.
tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?


==== tests/cases/compiler/callOverloads2.ts (7 errors) ====
    
    
    class Foo { // error
          ~~~
!!! error TS2300: Duplicate identifier 'Foo'.
        bar1() { /*WScript.Echo("bar1");*/ }
    
        constructor(x: any) {
            // WScript.Echo("Constructor function has executed");
        }
    }
    
    function Foo(); // error
             ~~~
!!! error TS2300: Duplicate identifier 'Foo'.
    
    function F1(s:string) {return s;} // error
             ~~
!!! error TS2389: Function implementation name must be 'Foo'.
             ~~
!!! error TS2393: Duplicate function implementation.
    function F1(a:any) { return a;} // error
             ~~
!!! error TS2393: Duplicate function implementation.
    
    function Goo(s:string); // error - no implementation
             ~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
    
    declare function Gar(s:String); // expect no error
    
    var f1 = new Foo("hey");
    
    
    f1.bar1();
    Foo();
    ~~~~~
!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?