Files
tsgo/testdata/baselines/reference/submodule/conformance/compoundAssignmentLHSIsValue.symbols

320 lines
10 KiB
Plaintext

//// [tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts] ////
=== compoundAssignmentLHSIsValue.ts ===
// expected error for all the LHS of compound assignments (arithmetic and addition)
var value: any;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// this
class C {
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
constructor() {
this *= value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
this += value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
foo() {
>foo : Symbol(C.foo, Decl(compoundAssignmentLHSIsValue.ts, 8, 5))
this *= value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
this += value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
static sfoo() {
>sfoo : Symbol(C.sfoo, Decl(compoundAssignmentLHSIsValue.ts, 12, 5))
this *= value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
this += value;
>this : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
}
function foo() {
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
this *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
this += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
this *= value;
>this : Symbol(globalThis)
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
this += value;
>this : Symbol(globalThis)
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// identifiers: module, class, enum, function
namespace M { export var a; }
>M : Symbol(M, Decl(compoundAssignmentLHSIsValue.ts, 25, 14))
>a : Symbol(a, Decl(compoundAssignmentLHSIsValue.ts, 28, 24))
M *= value;
>M : Symbol(M, Decl(compoundAssignmentLHSIsValue.ts, 25, 14))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
M += value;
>M : Symbol(M, Decl(compoundAssignmentLHSIsValue.ts, 25, 14))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
C *= value;
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
C += value;
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
enum E { }
>E : Symbol(E, Decl(compoundAssignmentLHSIsValue.ts, 33, 11))
E *= value;
>E : Symbol(E, Decl(compoundAssignmentLHSIsValue.ts, 33, 11))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
E += value;
>E : Symbol(E, Decl(compoundAssignmentLHSIsValue.ts, 33, 11))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
foo *= value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
foo += value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// literals
null *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
null += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
true *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
true += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
false *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
false += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
0 *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
0 += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
'' *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
'' += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
/d+/ *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
/d+/ += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// object literals
{ a: 0} *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
{ a: 0} += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// array literals
['', ''] *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
['', ''] += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// super
class Derived extends C {
>Derived : Symbol(Derived, Decl(compoundAssignmentLHSIsValue.ts, 62, 18))
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
constructor() {
super();
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
super *= value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
super += value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
foo() {
>foo : Symbol(Derived.foo, Decl(compoundAssignmentLHSIsValue.ts, 70, 5))
super *= value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
super += value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
static sfoo() {
>sfoo : Symbol(Derived.sfoo, Decl(compoundAssignmentLHSIsValue.ts, 75, 5))
super *= value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
super += value;
>super : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
}
}
// function expression
function bar1() { } *= value;
>bar1 : Symbol(bar1, Decl(compoundAssignmentLHSIsValue.ts, 81, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
function bar2() { } += value;
>bar2 : Symbol(bar2, Decl(compoundAssignmentLHSIsValue.ts, 84, 29))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
() => { } *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
() => { } += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// function calls
foo() *= value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
foo() += value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
// parentheses, the containted expression is value
(this) *= value;
>this : Symbol(globalThis)
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(this) += value;
>this : Symbol(globalThis)
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(M) *= value;
>M : Symbol(M, Decl(compoundAssignmentLHSIsValue.ts, 25, 14))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(M) += value;
>M : Symbol(M, Decl(compoundAssignmentLHSIsValue.ts, 25, 14))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(C) *= value;
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(C) += value;
>C : Symbol(C, Decl(compoundAssignmentLHSIsValue.ts, 1, 15))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(E) *= value;
>E : Symbol(E, Decl(compoundAssignmentLHSIsValue.ts, 33, 11))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(E) += value;
>E : Symbol(E, Decl(compoundAssignmentLHSIsValue.ts, 33, 11))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(foo) *= value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(foo) += value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(null) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(null) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(true) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(true) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(0) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(0) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
('') *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
('') += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(/d+/) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(/d+/) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
({}) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
({}) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
([]) *= value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
([]) += value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(function baz1() { }) *= value;
>baz1 : Symbol(baz1, Decl(compoundAssignmentLHSIsValue.ts, 118, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(function baz2() { }) += value;
>baz2 : Symbol(baz2, Decl(compoundAssignmentLHSIsValue.ts, 119, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(foo()) *= value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))
(foo()) += value;
>foo : Symbol(foo, Decl(compoundAssignmentLHSIsValue.ts, 17, 1))
>value : Symbol(value, Decl(compoundAssignmentLHSIsValue.ts, 1, 3))