mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
47 lines
2.1 KiB
Plaintext
47 lines
2.1 KiB
Plaintext
exponentiationOperatorWithNullValueAndValidOperands.ts(13,10): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(14,10): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(15,10): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(16,10): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(17,15): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(18,15): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(19,15): error TS18050: The value 'null' cannot be used here.
|
|
exponentiationOperatorWithNullValueAndValidOperands.ts(20,17): error TS18050: The value 'null' cannot be used here.
|
|
|
|
|
|
==== exponentiationOperatorWithNullValueAndValidOperands.ts (8 errors) ====
|
|
// If one operand is the null 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 r1 = null ** a;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r2 = null ** b;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r3 = null ** 1;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r4 = null ** E.a;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r5 = a ** null;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r6 = b ** null;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r7 = 0 ** null;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here.
|
|
var r8 = E.b ** null;
|
|
~~~~
|
|
!!! error TS18050: The value 'null' cannot be used here. |