mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
60 lines
2.6 KiB
Plaintext
60 lines
2.6 KiB
Plaintext
//// [tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts] ////
|
|
|
|
=== exponentiationOperatorWithNullValueAndInvalidOperands.ts ===
|
|
// If one operand is the null or undefined value, it is treated as having the type of the
|
|
// other operand.
|
|
|
|
declare var a: boolean;
|
|
>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 3, 11))
|
|
|
|
declare var b: string;
|
|
>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 4, 11))
|
|
|
|
declare var c: Object;
|
|
>c : Symbol(c, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 5, 11))
|
|
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
|
|
|
// operator **
|
|
var r1a1 = null ** a;
|
|
>r1a1 : Symbol(r1a1, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 8, 3))
|
|
>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 3, 11))
|
|
|
|
var r1a2 = null ** b;
|
|
>r1a2 : Symbol(r1a2, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 9, 3))
|
|
>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 4, 11))
|
|
|
|
var r1a3 = null ** c;
|
|
>r1a3 : Symbol(r1a3, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 10, 3))
|
|
>c : Symbol(c, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 5, 11))
|
|
|
|
var r1b1 = a ** null;
|
|
>r1b1 : Symbol(r1b1, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 12, 3))
|
|
>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 3, 11))
|
|
|
|
var r1b2 = b ** null;
|
|
>r1b2 : Symbol(r1b2, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 13, 3))
|
|
>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 4, 11))
|
|
|
|
var r1b3 = c ** null;
|
|
>r1b3 : Symbol(r1b3, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 14, 3))
|
|
>c : Symbol(c, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 5, 11))
|
|
|
|
var r1c1 = null ** true;
|
|
>r1c1 : Symbol(r1c1, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 16, 3))
|
|
|
|
var r1c2 = null ** '';
|
|
>r1c2 : Symbol(r1c2, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 17, 3))
|
|
|
|
var r1c3 = null ** {};
|
|
>r1c3 : Symbol(r1c3, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 18, 3))
|
|
|
|
var r1d1 = true ** null;
|
|
>r1d1 : Symbol(r1d1, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 20, 3))
|
|
|
|
var r1d2 = '' ** null;
|
|
>r1d2 : Symbol(r1d2, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 21, 3))
|
|
|
|
var r1d3 = {} ** null;
|
|
>r1d3 : Symbol(r1d3, Decl(exponentiationOperatorWithNullValueAndInvalidOperands.ts, 22, 3))
|
|
|