Files
tsgo/testdata/baselines/reference/submodule/conformance/exponentiationOperatorWithUndefinedValueAndValidOperands.errors.txt

47 lines
2.3 KiB
Plaintext

exponentiationOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(17,16): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(18,16): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(19,16): error TS18050: The value 'undefined' cannot be used here.
exponentiationOperatorWithUndefinedValueAndValidOperands.ts(20,18): error TS18050: The value 'undefined' cannot be used here.
==== exponentiationOperatorWithUndefinedValueAndValidOperands.ts (8 errors) ====
// If one operand is the undefined or undefined value, it is treated as having the type of the
// other operand.
enum E {
a,
b
}
declare var a: any;
declare var b: number;
// operator *
var rk1 = undefined ** a;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk2 = undefined ** b;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk3 = undefined ** 1;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk4 = undefined ** E.a;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk5 = a ** undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk6 = b ** undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk7 = 0 ** undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
var rk8 = E.b ** undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.