155 lines
6.7 KiB
Plaintext
155 lines
6.7 KiB
Plaintext
|
=== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts ===
|
||
|
// ++ operator on any type
|
||
|
|
||
|
var ANY: any;
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
|
||
|
var ANY1;
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
var ANY2: any[] = ["", ""];
|
||
|
>ANY2 : Symbol(ANY2, Decl(incrementOperatorWithAnyOtherType.ts, 4, 3))
|
||
|
|
||
|
var obj = {x:1,y:null};
|
||
|
>obj : Symbol(obj, Decl(incrementOperatorWithAnyOtherType.ts, 5, 3))
|
||
|
>x : Symbol(x, Decl(incrementOperatorWithAnyOtherType.ts, 5, 11))
|
||
|
>y : Symbol(y, Decl(incrementOperatorWithAnyOtherType.ts, 5, 15))
|
||
|
|
||
|
class A {
|
||
|
>A : Symbol(A, Decl(incrementOperatorWithAnyOtherType.ts, 5, 23))
|
||
|
|
||
|
public a: any;
|
||
|
>a : Symbol(a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
}
|
||
|
module M {
|
||
|
>M : Symbol(M, Decl(incrementOperatorWithAnyOtherType.ts, 8, 1))
|
||
|
|
||
|
export var n: any;
|
||
|
>n : Symbol(n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
}
|
||
|
var objA = new A();
|
||
|
>objA : Symbol(objA, Decl(incrementOperatorWithAnyOtherType.ts, 12, 3))
|
||
|
>A : Symbol(A, Decl(incrementOperatorWithAnyOtherType.ts, 5, 23))
|
||
|
|
||
|
// any type var
|
||
|
var ResultIsNumber1 = ++ANY;
|
||
|
>ResultIsNumber1 : Symbol(ResultIsNumber1, Decl(incrementOperatorWithAnyOtherType.ts, 15, 3))
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
|
||
|
var ResultIsNumber2 = ++ANY1;
|
||
|
>ResultIsNumber2 : Symbol(ResultIsNumber2, Decl(incrementOperatorWithAnyOtherType.ts, 16, 3))
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
var ResultIsNumber3 = ANY1++;
|
||
|
>ResultIsNumber3 : Symbol(ResultIsNumber3, Decl(incrementOperatorWithAnyOtherType.ts, 18, 3))
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
var ResultIsNumber4 = ANY1++;
|
||
|
>ResultIsNumber4 : Symbol(ResultIsNumber4, Decl(incrementOperatorWithAnyOtherType.ts, 19, 3))
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
// expressions
|
||
|
var ResultIsNumber5 = ++ANY2[0];
|
||
|
>ResultIsNumber5 : Symbol(ResultIsNumber5, Decl(incrementOperatorWithAnyOtherType.ts, 22, 3))
|
||
|
>ANY2 : Symbol(ANY2, Decl(incrementOperatorWithAnyOtherType.ts, 4, 3))
|
||
|
|
||
|
var ResultIsNumber6 = ++obj.x;
|
||
|
>ResultIsNumber6 : Symbol(ResultIsNumber6, Decl(incrementOperatorWithAnyOtherType.ts, 23, 3))
|
||
|
>obj.x : Symbol(x, Decl(incrementOperatorWithAnyOtherType.ts, 5, 11))
|
||
|
>obj : Symbol(obj, Decl(incrementOperatorWithAnyOtherType.ts, 5, 3))
|
||
|
>x : Symbol(x, Decl(incrementOperatorWithAnyOtherType.ts, 5, 11))
|
||
|
|
||
|
var ResultIsNumber7 = ++obj.y;
|
||
|
>ResultIsNumber7 : Symbol(ResultIsNumber7, Decl(incrementOperatorWithAnyOtherType.ts, 24, 3))
|
||
|
>obj.y : Symbol(y, Decl(incrementOperatorWithAnyOtherType.ts, 5, 15))
|
||
|
>obj : Symbol(obj, Decl(incrementOperatorWithAnyOtherType.ts, 5, 3))
|
||
|
>y : Symbol(y, Decl(incrementOperatorWithAnyOtherType.ts, 5, 15))
|
||
|
|
||
|
var ResultIsNumber8 = ++objA.a;
|
||
|
>ResultIsNumber8 : Symbol(ResultIsNumber8, Decl(incrementOperatorWithAnyOtherType.ts, 25, 3))
|
||
|
>objA.a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
>objA : Symbol(objA, Decl(incrementOperatorWithAnyOtherType.ts, 12, 3))
|
||
|
>a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
|
||
|
var ResultIsNumber = ++M.n;
|
||
|
>ResultIsNumber : Symbol(ResultIsNumber, Decl(incrementOperatorWithAnyOtherType.ts, 26, 3))
|
||
|
>M.n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
>M : Symbol(M, Decl(incrementOperatorWithAnyOtherType.ts, 8, 1))
|
||
|
>n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
|
||
|
var ResultIsNumber9 = ANY2[0]++;
|
||
|
>ResultIsNumber9 : Symbol(ResultIsNumber9, Decl(incrementOperatorWithAnyOtherType.ts, 28, 3))
|
||
|
>ANY2 : Symbol(ANY2, Decl(incrementOperatorWithAnyOtherType.ts, 4, 3))
|
||
|
|
||
|
var ResultIsNumber10 = obj.x++;
|
||
|
>ResultIsNumber10 : Symbol(ResultIsNumber10, Decl(incrementOperatorWithAnyOtherType.ts, 29, 3))
|
||
|
>obj.x : Symbol(x, Decl(incrementOperatorWithAnyOtherType.ts, 5, 11))
|
||
|
>obj : Symbol(obj, Decl(incrementOperatorWithAnyOtherType.ts, 5, 3))
|
||
|
>x : Symbol(x, Decl(incrementOperatorWithAnyOtherType.ts, 5, 11))
|
||
|
|
||
|
var ResultIsNumber11 = obj.y++;
|
||
|
>ResultIsNumber11 : Symbol(ResultIsNumber11, Decl(incrementOperatorWithAnyOtherType.ts, 30, 3))
|
||
|
>obj.y : Symbol(y, Decl(incrementOperatorWithAnyOtherType.ts, 5, 15))
|
||
|
>obj : Symbol(obj, Decl(incrementOperatorWithAnyOtherType.ts, 5, 3))
|
||
|
>y : Symbol(y, Decl(incrementOperatorWithAnyOtherType.ts, 5, 15))
|
||
|
|
||
|
var ResultIsNumber12 = objA.a++;
|
||
|
>ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(incrementOperatorWithAnyOtherType.ts, 31, 3))
|
||
|
>objA.a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
>objA : Symbol(objA, Decl(incrementOperatorWithAnyOtherType.ts, 12, 3))
|
||
|
>a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
|
||
|
var ResultIsNumber13 = M.n++;
|
||
|
>ResultIsNumber13 : Symbol(ResultIsNumber13, Decl(incrementOperatorWithAnyOtherType.ts, 32, 3))
|
||
|
>M.n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
>M : Symbol(M, Decl(incrementOperatorWithAnyOtherType.ts, 8, 1))
|
||
|
>n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
|
||
|
// miss assignment opertors
|
||
|
++ANY;
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
|
||
|
++ANY1;
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
++ANY2[0];
|
||
|
>ANY2 : Symbol(ANY2, Decl(incrementOperatorWithAnyOtherType.ts, 4, 3))
|
||
|
|
||
|
++ANY, ++ANY1;
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
++objA.a;
|
||
|
>objA.a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
>objA : Symbol(objA, Decl(incrementOperatorWithAnyOtherType.ts, 12, 3))
|
||
|
>a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
|
||
|
++M.n;
|
||
|
>M.n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
>M : Symbol(M, Decl(incrementOperatorWithAnyOtherType.ts, 8, 1))
|
||
|
>n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
|
||
|
ANY++;
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
|
||
|
ANY1++;
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
ANY2[0]++;
|
||
|
>ANY2 : Symbol(ANY2, Decl(incrementOperatorWithAnyOtherType.ts, 4, 3))
|
||
|
|
||
|
ANY++, ANY1++;
|
||
|
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
|
||
|
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
|
||
|
|
||
|
objA.a++;
|
||
|
>objA.a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
>objA : Symbol(objA, Decl(incrementOperatorWithAnyOtherType.ts, 12, 3))
|
||
|
>a : Symbol(A.a, Decl(incrementOperatorWithAnyOtherType.ts, 6, 9))
|
||
|
|
||
|
M.n++;
|
||
|
>M.n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
>M : Symbol(M, Decl(incrementOperatorWithAnyOtherType.ts, 8, 1))
|
||
|
>n : Symbol(M.n, Decl(incrementOperatorWithAnyOtherType.ts, 10, 14))
|
||
|
|