File: invalidUndefinedAssignments.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (42 lines) | stat: -rw-r--r-- 1,872 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
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2539: Cannot assign to 'E' because it is not a variable.
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2539: Cannot assign to 'C' because it is not a variable.
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2693: 'I' only refers to a type, but is being used as a value here.
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable.
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(21,1): error TS2539: Cannot assign to 'i' because it is not a variable.


==== tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts (6 errors) ====
    var x: typeof undefined;
    
    enum E { A }
    E = x;
    ~
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
    E.A = x;
      ~
!!! error TS2540: Cannot assign to 'A' because it is a read-only property.
    
    class C { foo: string }
    var f: C;
    C = x;
    ~
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
    
    interface I { foo: string }
    var g: I;
    g = x;
    I = x;
    ~
!!! error TS2693: 'I' only refers to a type, but is being used as a value here.
    
    module M { export var x = 1; }
    M = x;
    ~
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
    
    function i<T>(a: T) { }
    // BUG 767030
    i = x; 
    ~
!!! error TS2539: Cannot assign to 'i' because it is not a variable.