tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7,13): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(8,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(11,18): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(13,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2539: Cannot assign to 'C' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2539: Cannot assign to 'E' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2539: Cannot assign to 'foo' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(27,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(28,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(29,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(30,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(31,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(32,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,3): error TS7028: Unused label. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,2): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,6): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(50,20): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,11): error TS1005: ';' expected. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,2): error TS2539: Cannot assign to 'M' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,2): error TS2539: Cannot assign to 'C' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,2): error TS2539: Cannot assign to 'E' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,2): error TS2539: Cannot assign to 'foo' because it is not a variable. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(62,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(64,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(65,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(66,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(67,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(68,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(69,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ==== // expected error for all the LHS of assignments var value: any; // this class C { constructor() { this = value; } ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. foo() { this = value; } ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. static sfoo() { this = value; } ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. } function foo() { this = value; } ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. this = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. // identifiers: module, class, enum, function module M { export var a; } M = value; ~ !!! error TS2539: Cannot assign to 'M' because it is not a variable. C = value; ~ !!! error TS2539: Cannot assign to 'C' because it is not a variable. enum E { } E = value; ~ !!! error TS2539: Cannot assign to 'E' because it is not a variable. foo = value; ~~~ !!! error TS2539: Cannot assign to 'foo' because it is not a variable. // literals null = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. true = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. false = value; ~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. 0 = value; ~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. '' = value; ~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. /d+/ = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. // object literals { a: 0} = value; ~ !!! error TS7028: Unused label. ~ !!! error TS1128: Declaration or statement expected. // array literals ['', ''] = value; ~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. // super class Derived extends C { constructor() { super(); super = value; } ~ !!! error TS1034: 'super' must be followed by an argument list or member access. foo() { super = value } ~ !!! error TS1034: 'super' must be followed by an argument list or member access. static sfoo() { super = value; } ~ !!! error TS1034: 'super' must be followed by an argument list or member access. } // function expression function bar() { } = value; ~ !!! error TS1128: Declaration or statement expected. () => { } = value; ~ !!! error TS1005: ';' expected. // function calls foo() = value; ~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. // parentheses, the containted expression is value (this) = value; ~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (M) = value; ~ !!! error TS2539: Cannot assign to 'M' because it is not a variable. (C) = value; ~ !!! error TS2539: Cannot assign to 'C' because it is not a variable. (E) = value; ~ !!! error TS2539: Cannot assign to 'E' because it is not a variable. (foo) = value; ~~~ !!! error TS2539: Cannot assign to 'foo' because it is not a variable. (null) = value; ~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (true) = value; ~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (0) = value; ~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ('') = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (/d+/) = value; ~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ({}) = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. ([]) = value; ~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (function baz() { }) = value; ~~~~~~~~~~~~~~~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. (foo()) = value; ~~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.