TypeScript/tests/baselines/reference/negateOperatorWithAnyOtherType.symbols
2015-04-15 16:44:20 -07:00

157 lines
6.2 KiB
Plaintext

=== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts ===
// - operator on any type
var ANY: any;
>ANY : Symbol(ANY, Decl(negateOperatorWithAnyOtherType.ts, 2, 3))
var ANY1;
>ANY1 : Symbol(ANY1, Decl(negateOperatorWithAnyOtherType.ts, 3, 3))
var ANY2: any[] = ["", ""];
>ANY2 : Symbol(ANY2, Decl(negateOperatorWithAnyOtherType.ts, 4, 3))
var obj: () => {}
>obj : Symbol(obj, Decl(negateOperatorWithAnyOtherType.ts, 5, 3))
var obj1 = { x: "", y: () => { }};
>obj1 : Symbol(obj1, Decl(negateOperatorWithAnyOtherType.ts, 6, 3))
>x : Symbol(x, Decl(negateOperatorWithAnyOtherType.ts, 6, 12))
>y : Symbol(y, Decl(negateOperatorWithAnyOtherType.ts, 6, 19))
function foo(): any {
>foo : Symbol(foo, Decl(negateOperatorWithAnyOtherType.ts, 6, 34))
var a;
>a : Symbol(a, Decl(negateOperatorWithAnyOtherType.ts, 9, 7))
return a;
>a : Symbol(a, Decl(negateOperatorWithAnyOtherType.ts, 9, 7))
}
class A {
>A : Symbol(A, Decl(negateOperatorWithAnyOtherType.ts, 11, 1))
public a: any;
>a : Symbol(a, Decl(negateOperatorWithAnyOtherType.ts, 12, 9))
static foo() {
>foo : Symbol(A.foo, Decl(negateOperatorWithAnyOtherType.ts, 13, 18))
var a;
>a : Symbol(a, Decl(negateOperatorWithAnyOtherType.ts, 15, 11))
return a;
>a : Symbol(a, Decl(negateOperatorWithAnyOtherType.ts, 15, 11))
}
}
module M {
>M : Symbol(M, Decl(negateOperatorWithAnyOtherType.ts, 18, 1))
export var n: any;
>n : Symbol(n, Decl(negateOperatorWithAnyOtherType.ts, 20, 14))
}
var objA = new A();
>objA : Symbol(objA, Decl(negateOperatorWithAnyOtherType.ts, 22, 3))
>A : Symbol(A, Decl(negateOperatorWithAnyOtherType.ts, 11, 1))
// any type var
var ResultIsNumber1 = -ANY1;
>ResultIsNumber1 : Symbol(ResultIsNumber1, Decl(negateOperatorWithAnyOtherType.ts, 25, 3))
>ANY1 : Symbol(ANY1, Decl(negateOperatorWithAnyOtherType.ts, 3, 3))
var ResultIsNumber2 = -ANY2;
>ResultIsNumber2 : Symbol(ResultIsNumber2, Decl(negateOperatorWithAnyOtherType.ts, 26, 3))
>ANY2 : Symbol(ANY2, Decl(negateOperatorWithAnyOtherType.ts, 4, 3))
var ResultIsNumber3 = -A;
>ResultIsNumber3 : Symbol(ResultIsNumber3, Decl(negateOperatorWithAnyOtherType.ts, 27, 3))
>A : Symbol(A, Decl(negateOperatorWithAnyOtherType.ts, 11, 1))
var ResultIsNumber4 = -M;
>ResultIsNumber4 : Symbol(ResultIsNumber4, Decl(negateOperatorWithAnyOtherType.ts, 28, 3))
>M : Symbol(M, Decl(negateOperatorWithAnyOtherType.ts, 18, 1))
var ResultIsNumber5 = -obj;
>ResultIsNumber5 : Symbol(ResultIsNumber5, Decl(negateOperatorWithAnyOtherType.ts, 29, 3))
>obj : Symbol(obj, Decl(negateOperatorWithAnyOtherType.ts, 5, 3))
var ResultIsNumber6 = -obj1;
>ResultIsNumber6 : Symbol(ResultIsNumber6, Decl(negateOperatorWithAnyOtherType.ts, 30, 3))
>obj1 : Symbol(obj1, Decl(negateOperatorWithAnyOtherType.ts, 6, 3))
// any type literal
var ResultIsNumber7 = -undefined;
>ResultIsNumber7 : Symbol(ResultIsNumber7, Decl(negateOperatorWithAnyOtherType.ts, 33, 3))
>undefined : Symbol(undefined)
var ResultIsNumber = -null;
>ResultIsNumber : Symbol(ResultIsNumber, Decl(negateOperatorWithAnyOtherType.ts, 34, 3))
// any type expressions
var ResultIsNumber8 = -ANY2[0];
>ResultIsNumber8 : Symbol(ResultIsNumber8, Decl(negateOperatorWithAnyOtherType.ts, 37, 3))
>ANY2 : Symbol(ANY2, Decl(negateOperatorWithAnyOtherType.ts, 4, 3))
var ResultIsNumber9 = -obj1.x;
>ResultIsNumber9 : Symbol(ResultIsNumber9, Decl(negateOperatorWithAnyOtherType.ts, 38, 3))
>obj1.x : Symbol(x, Decl(negateOperatorWithAnyOtherType.ts, 6, 12))
>obj1 : Symbol(obj1, Decl(negateOperatorWithAnyOtherType.ts, 6, 3))
>x : Symbol(x, Decl(negateOperatorWithAnyOtherType.ts, 6, 12))
var ResultIsNumber10 = -obj1.y;
>ResultIsNumber10 : Symbol(ResultIsNumber10, Decl(negateOperatorWithAnyOtherType.ts, 39, 3))
>obj1.y : Symbol(y, Decl(negateOperatorWithAnyOtherType.ts, 6, 19))
>obj1 : Symbol(obj1, Decl(negateOperatorWithAnyOtherType.ts, 6, 3))
>y : Symbol(y, Decl(negateOperatorWithAnyOtherType.ts, 6, 19))
var ResultIsNumber11 = -objA.a;
>ResultIsNumber11 : Symbol(ResultIsNumber11, Decl(negateOperatorWithAnyOtherType.ts, 40, 3))
>objA.a : Symbol(A.a, Decl(negateOperatorWithAnyOtherType.ts, 12, 9))
>objA : Symbol(objA, Decl(negateOperatorWithAnyOtherType.ts, 22, 3))
>a : Symbol(A.a, Decl(negateOperatorWithAnyOtherType.ts, 12, 9))
var ResultIsNumber12 = -M.n;
>ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(negateOperatorWithAnyOtherType.ts, 41, 3))
>M.n : Symbol(M.n, Decl(negateOperatorWithAnyOtherType.ts, 20, 14))
>M : Symbol(M, Decl(negateOperatorWithAnyOtherType.ts, 18, 1))
>n : Symbol(M.n, Decl(negateOperatorWithAnyOtherType.ts, 20, 14))
var ResultIsNumber13 = -foo();
>ResultIsNumber13 : Symbol(ResultIsNumber13, Decl(negateOperatorWithAnyOtherType.ts, 42, 3))
>foo : Symbol(foo, Decl(negateOperatorWithAnyOtherType.ts, 6, 34))
var ResultIsNumber14 = -A.foo();
>ResultIsNumber14 : Symbol(ResultIsNumber14, Decl(negateOperatorWithAnyOtherType.ts, 43, 3))
>A.foo : Symbol(A.foo, Decl(negateOperatorWithAnyOtherType.ts, 13, 18))
>A : Symbol(A, Decl(negateOperatorWithAnyOtherType.ts, 11, 1))
>foo : Symbol(A.foo, Decl(negateOperatorWithAnyOtherType.ts, 13, 18))
var ResultIsNumber15 = -(ANY - ANY1);
>ResultIsNumber15 : Symbol(ResultIsNumber15, Decl(negateOperatorWithAnyOtherType.ts, 44, 3))
>ANY : Symbol(ANY, Decl(negateOperatorWithAnyOtherType.ts, 2, 3))
>ANY1 : Symbol(ANY1, Decl(negateOperatorWithAnyOtherType.ts, 3, 3))
// miss assignment operators
-ANY;
>ANY : Symbol(ANY, Decl(negateOperatorWithAnyOtherType.ts, 2, 3))
-ANY1;
>ANY1 : Symbol(ANY1, Decl(negateOperatorWithAnyOtherType.ts, 3, 3))
-ANY2[0];
>ANY2 : Symbol(ANY2, Decl(negateOperatorWithAnyOtherType.ts, 4, 3))
-ANY, ANY1;
>ANY : Symbol(ANY, Decl(negateOperatorWithAnyOtherType.ts, 2, 3))
>ANY1 : Symbol(ANY1, Decl(negateOperatorWithAnyOtherType.ts, 3, 3))
-objA.a;
>objA.a : Symbol(A.a, Decl(negateOperatorWithAnyOtherType.ts, 12, 9))
>objA : Symbol(objA, Decl(negateOperatorWithAnyOtherType.ts, 22, 3))
>a : Symbol(A.a, Decl(negateOperatorWithAnyOtherType.ts, 12, 9))
-M.n;
>M.n : Symbol(M.n, Decl(negateOperatorWithAnyOtherType.ts, 20, 14))
>M : Symbol(M, Decl(negateOperatorWithAnyOtherType.ts, 18, 1))
>n : Symbol(M.n, Decl(negateOperatorWithAnyOtherType.ts, 20, 14))