File: parserCastVersusArrowFunction1.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 (58 lines) | stat: -rw-r--r-- 4,284 bytes parent folder | download | duplicates (4)
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
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(2,10): error TS2304: Cannot find name 'T'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(2,12): error TS2304: Cannot find name 'a'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(4,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a: any) => number'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(5,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a: any, b: any) => number'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(6,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a?: number, b?: number) => number'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(8,10): error TS2304: Cannot find name 'T'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(8,13): error TS2304: Cannot find name 'a'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(9,10): error TS2304: Cannot find name 'T'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(9,13): error TS2304: Cannot find name 'a'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(9,13): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(9,16): error TS2304: Cannot find name 'b'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(10,10): error TS2304: Cannot find name 'T'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(10,13): error TS2304: Cannot find name 'a'.
tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts(10,20): error TS2304: Cannot find name 'b'.


==== tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts (14 errors) ====
    var v = <T>() => 1;
    var v = <T>a;
             ~
!!! error TS2304: Cannot find name 'T'.
               ~
!!! error TS2304: Cannot find name 'a'.
    
    var v = <T>(a) => 1;
        ~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a: any) => number'.
!!! related TS6203 tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts:1:5: 'v' was also declared here.
    var v = <T>(a, b) => 1;
        ~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a: any, b: any) => number'.
!!! related TS6203 tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts:1:5: 'v' was also declared here.
    var v = <T>(a = 1, b = 2) => 1;
        ~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'v' must be of type '<T>() => number', but here has type '<T>(a?: number, b?: number) => number'.
!!! related TS6203 tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts:1:5: 'v' was also declared here.
    
    var v = <T>(a);
             ~
!!! error TS2304: Cannot find name 'T'.
                ~
!!! error TS2304: Cannot find name 'a'.
    var v = <T>(a, b);
             ~
!!! error TS2304: Cannot find name 'T'.
                ~
!!! error TS2304: Cannot find name 'a'.
                ~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
                   ~
!!! error TS2304: Cannot find name 'b'.
    var v = <T>(a = 1, b = 2);
             ~
!!! error TS2304: Cannot find name 'T'.
                ~
!!! error TS2304: Cannot find name 'a'.
                       ~
!!! error TS2304: Cannot find name 'b'.