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