mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
compoundExponentiationAssignmentLHSIsReference.ts(5,1): error TS2454: Variable 'x1' is used before being assigned.
|
|
compoundExponentiationAssignmentLHSIsReference.ts(13,1): error TS2454: Variable 'x3' is used before being assigned.
|
|
compoundExponentiationAssignmentLHSIsReference.ts(15,1): error TS2454: Variable 'x3' is used before being assigned.
|
|
compoundExponentiationAssignmentLHSIsReference.ts(18,2): error TS2454: Variable 'x1' is used before being assigned.
|
|
compoundExponentiationAssignmentLHSIsReference.ts(24,2): error TS2454: Variable 'x3' is used before being assigned.
|
|
compoundExponentiationAssignmentLHSIsReference.ts(26,2): error TS2454: Variable 'x3' is used before being assigned.
|
|
|
|
|
|
==== compoundExponentiationAssignmentLHSIsReference.ts (6 errors) ====
|
|
var value: any;
|
|
|
|
// identifiers: variable and parameter
|
|
var x1: number;
|
|
x1 **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x1' is used before being assigned.
|
|
|
|
function fn1(x2: number) {
|
|
x2 **= value;
|
|
}
|
|
|
|
// property accesses
|
|
var x3: { a: number };
|
|
x3.a **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x3' is used before being assigned.
|
|
|
|
x3['a'] **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x3' is used before being assigned.
|
|
|
|
// parentheses, the contained expression is reference
|
|
(x1) **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x1' is used before being assigned.
|
|
|
|
function fn2(x4: number) {
|
|
(x4) **= value;
|
|
}
|
|
|
|
(x3.a) **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x3' is used before being assigned.
|
|
|
|
(x3['a']) **= value;
|
|
~~
|
|
!!! error TS2454: Variable 'x3' is used before being assigned. |