38 lines
No EOL
1.1 KiB
Text
38 lines
No EOL
1.1 KiB
Text
tests/cases/compiler/assignmentToReferenceTypes.ts(5,1): error TS2304: Cannot find name 'M'.
|
|
tests/cases/compiler/assignmentToReferenceTypes.ts(9,1): error TS2364: Invalid left-hand side of assignment expression.
|
|
tests/cases/compiler/assignmentToReferenceTypes.ts(13,1): error TS2364: Invalid left-hand side of assignment expression.
|
|
tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2364: Invalid left-hand side of assignment expression.
|
|
|
|
|
|
==== tests/cases/compiler/assignmentToReferenceTypes.ts (4 errors) ====
|
|
// Should all be allowed
|
|
|
|
module M {
|
|
}
|
|
M = null;
|
|
~
|
|
!!! error TS2304: Cannot find name 'M'.
|
|
|
|
class C {
|
|
}
|
|
C = null;
|
|
~
|
|
!!! error TS2364: Invalid left-hand side of assignment expression.
|
|
|
|
enum E {
|
|
}
|
|
E = null;
|
|
~
|
|
!!! error TS2364: Invalid left-hand side of assignment expression.
|
|
|
|
function f() { }
|
|
f = null;
|
|
~
|
|
!!! error TS2364: Invalid left-hand side of assignment expression.
|
|
|
|
var x = 1;
|
|
x = null;
|
|
|
|
function g(x) {
|
|
x = null;
|
|
} |