Accept new baselines

This commit is contained in:
Anders Hejlsberg
2016-09-21 16:04:36 -07:00
parent b14b24a96e
commit c37b790ff3
74 changed files with 471 additions and 346 deletions
@@ -4,7 +4,7 @@ tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2304: Cann
==== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts (2 errors) ====
module M {
var Symbol;
var Symbol: any;
export class C {
[Symbol.iterator]() { }
@@ -1,6 +1,6 @@
//// [ES5SymbolProperty2.ts]
module M {
var Symbol;
var Symbol: any;
export class C {
[Symbol.iterator]() { }
@@ -2,7 +2,7 @@ tests/cases/conformance/Symbols/ES5SymbolProperty3.ts(4,6): error TS2471: A comp
==== tests/cases/conformance/Symbols/ES5SymbolProperty3.ts (1 errors) ====
var Symbol;
var Symbol: any;
class C {
[Symbol.iterator]() { }
@@ -1,5 +1,5 @@
//// [ES5SymbolProperty3.ts]
var Symbol;
var Symbol: any;
class C {
[Symbol.iterator]() { }
+1 -1
View File
@@ -1,5 +1,5 @@
//// [anyPlusAny1.ts]
var x;
var x: any;
x.name = "hello";
var z = x + x;
@@ -1,5 +1,5 @@
=== tests/cases/compiler/anyPlusAny1.ts ===
var x;
var x: any;
>x : Symbol(x, Decl(anyPlusAny1.ts, 0, 3))
x.name = "hello";
+1 -1
View File
@@ -1,5 +1,5 @@
=== tests/cases/compiler/anyPlusAny1.ts ===
var x;
var x: any;
>x : any
x.name = "hello";
@@ -10,10 +10,10 @@ var Foo;
>Foo : any
type
>type : any
>type : undefined
Foo = string;
>Foo = string : any
>Foo = string : undefined
>Foo : any
>string : any
>string : undefined
@@ -1,5 +1,5 @@
//// [assignmentLHSIsReference.ts]
var value;
var value: any;
// identifiers: variable and parameter
var x1: number;
@@ -1,5 +1,5 @@
=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts ===
var value;
var value: any;
>value : Symbol(value, Decl(assignmentLHSIsReference.ts, 0, 3))
// identifiers: variable and parameter
@@ -1,5 +1,5 @@
=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts ===
var value;
var value: any;
>value : any
// identifiers: variable and parameter
@@ -41,7 +41,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7
==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ====
// expected error for all the LHS of assignments
var value;
var value: any;
// this
class C {
@@ -1,6 +1,6 @@
//// [assignmentLHSIsValue.ts]
// expected error for all the LHS of assignments
var value;
var value: any;
// this
class C {
@@ -39,7 +39,7 @@ for (let x = 0; x < 1; ++x) {
}
switch (x) {
>x : any
>x : undefined
case 1:
>1 : 1
@@ -40,7 +40,7 @@ for (let x = 0; x < 1; ++x) {
}
switch (x) {
>x : any
>x : undefined
case 1:
>1 : 1
@@ -17,7 +17,7 @@ foo(/*c2*/ 1, /*d2*/ 1 + 2, /*e1*/ a + b);
>1 : 1
>2 : 2
>a + b : any
>a : any
>a : undefined
>b : any
foo(/*c3*/ function () { }, /*d2*/() => { }, /*e2*/ a + /*e3*/ b);
@@ -26,7 +26,7 @@ foo(/*c3*/ function () { }, /*d2*/() => { }, /*e2*/ a + /*e3*/ b);
>function () { } : () => void
>() => { } : () => void
>a + /*e3*/ b : any
>a : any
>a : undefined
>b : any
foo(/*c3*/ function () { }, /*d3*/() => { }, /*e3*/(a + b));
@@ -36,7 +36,7 @@ foo(/*c3*/ function () { }, /*d3*/() => { }, /*e3*/(a + b));
>() => { } : () => void
>(a + b) : any
>a + b : any
>a : any
>a : undefined
>b : any
foo(
@@ -9,12 +9,12 @@ var x1: number;
x1 *= value;
>x1 *= value : number
>x1 : number
>value : any
>value : undefined
x1 += value;
>x1 += value : any
>x1 += value : number
>x1 : number
>value : any
>value : undefined
function fn1(x2: number) {
>fn1 : (x2: number) => void
@@ -41,41 +41,41 @@ x3.a *= value;
>x3.a : number
>x3 : { a: number; }
>a : number
>value : any
>value : undefined
x3.a += value;
>x3.a += value : any
>x3.a += value : number
>x3.a : number
>x3 : { a: number; }
>a : number
>value : any
>value : undefined
x3['a'] *= value;
>x3['a'] *= value : number
>x3['a'] : number
>x3 : { a: number; }
>'a' : "a"
>value : any
>value : undefined
x3['a'] += value;
>x3['a'] += value : any
>x3['a'] += value : number
>x3['a'] : number
>x3 : { a: number; }
>'a' : "a"
>value : any
>value : undefined
// parentheses, the contained expression is reference
(x1) *= value;
>(x1) *= value : number
>(x1) : number
>x1 : number
>value : any
>value : undefined
(x1) += value;
>(x1) += value : any
>(x1) += value : number
>(x1) : number
>x1 : number
>value : any
>value : undefined
function fn2(x4: number) {
>fn2 : (x4: number) => void
@@ -100,15 +100,15 @@ function fn2(x4: number) {
>x3.a : number
>x3 : { a: number; }
>a : number
>value : any
>value : undefined
(x3.a) += value;
>(x3.a) += value : any
>(x3.a) += value : number
>(x3.a) : number
>x3.a : number
>x3 : { a: number; }
>a : number
>value : any
>value : undefined
(x3['a']) *= value;
>(x3['a']) *= value : number
@@ -116,13 +116,13 @@ function fn2(x4: number) {
>x3['a'] : number
>x3 : { a: number; }
>'a' : "a"
>value : any
>value : undefined
(x3['a']) += value;
>(x3['a']) += value : any
>(x3['a']) += value : number
>(x3['a']) : number
>x3['a'] : number
>x3 : { a: number; }
>'a' : "a"
>value : any
>value : undefined
@@ -77,7 +77,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (74 errors) ====
// expected error for all the LHS of compound assignments (arithmetic and addition)
var value;
var value: any;
// this
class C {
@@ -1,7 +1,7 @@
//// [compoundAssignmentLHSIsValue.ts]
// expected error for all the LHS of compound assignments (arithmetic and addition)
var value;
var value: any;
// this
class C {
@@ -1,5 +1,5 @@
//// [compoundExponentiationAssignmentLHSIsReference.ts]
var value;
var value: any;
// identifiers: variable and parameter
var x1: number;
@@ -1,5 +1,5 @@
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts ===
var value;
var value: any;
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
// identifiers: variable and parameter
@@ -1,5 +1,5 @@
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts ===
var value;
var value: any;
>value : any
// identifiers: variable and parameter
@@ -40,7 +40,7 @@ tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignm
==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts (38 errors) ====
// expected error for all the LHS of compound assignments (arithmetic and addition)
var value;
var value: any;
// this
class C {
@@ -1,6 +1,6 @@
//// [compoundExponentiationAssignmentLHSIsValue.ts]
// expected error for all the LHS of compound assignments (arithmetic and addition)
var value;
var value: any;
// this
class C {
@@ -35,20 +35,20 @@ var a;
>a : any
foo(a);
>foo(a) : any
>foo(a) : undefined
>foo : <T extends String>(x: T) => T
>a : any
>a : undefined
foo2(a);
>foo2(a) : any
>foo2(a) : undefined
>foo2 : <T extends { x: number; }>(x: T) => T
>a : any
>a : undefined
//foo3(a);
foo4(a);
>foo4(a) : any
>foo4(a) : undefined
>foo4 : <T extends <T>(x: T) => void>(x: T) => T
>a : any
>a : undefined
var b: number;
>b : number
@@ -84,10 +84,10 @@ class C<T extends String> {
}
var c1 = new C(a);
>c1 : C<any>
>new C(a) : C<any>
>c1 : C<undefined>
>new C(a) : C<undefined>
>C : typeof C
>a : any
>a : undefined
var c2 = new C<any>(b);
>c2 : C<any>
@@ -106,10 +106,10 @@ class C2<T extends { x: number }> {
}
var c3 = new C2(a);
>c3 : C2<any>
>new C2(a) : C2<any>
>c3 : C2<undefined>
>new C2(a) : C2<undefined>
>C2 : typeof C2
>a : any
>a : undefined
var c4 = new C2<any>(b);
>c4 : C2<any>
@@ -138,10 +138,10 @@ class C4<T extends <T>(x:T) => T> {
}
var c7 = new C4(a);
>c7 : C4<any>
>new C4(a) : C4<any>
>c7 : C4<undefined>
>new C4(a) : C4<undefined>
>C4 : typeof C4
>a : any
>a : undefined
var c8 = new C4<any>(b);
>c8 : C4<any>
@@ -0,0 +1,128 @@
tests/cases/compiler/controlFlowCaching.ts(38,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(38,29): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(40,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(40,29): error TS2339: Property 'x' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(42,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(42,29): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(44,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(44,29): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(46,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(46,29): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(48,17): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(48,29): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(53,5): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(53,14): error TS2339: Property 'y' does not exist on type 'never'.
tests/cases/compiler/controlFlowCaching.ts(55,14): error TS2678: Type '"start"' is not comparable to type 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(58,14): error TS2678: Type '"end"' is not comparable to type 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(61,14): error TS2678: Type '"middle"' is not comparable to type 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(62,13): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/controlFlowCaching.ts(62,25): error TS2339: Property 'y' does not exist on type 'never'.
==== tests/cases/compiler/controlFlowCaching.ts (19 errors) ====
// Repro for #8401
function f(dim, offsets, arr, acommon, centerAnchorLimit, g, has, lin) {
var isRtl = this._isRtl(); // chart mirroring
// prepare variable
var o = this.opt, ta = this.chart.theme.axis, position = o.position,
leftBottom = position !== "rightOrTop", rotation = o.rotation % 360,
start, stop, titlePos, titleRotation = 0, titleOffset, axisVector, tickVector, anchorOffset, labelOffset, labelAlign,
labelGap = this.chart.theme.axis.tick.labelGap,
taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font),
taTitleFont = o.titleFont || (ta.title && ta.title.font),
taFontColor = o.fontColor || (ta.majorTick && ta.majorTick.fontColor) || (ta.tick && ta.tick.fontColor) || "black",
taTitleFontColor = o.titleFontColor || (ta.title && ta.title.fontColor) || "black",
taTitleGap = (o.titleGap == 0) ? 0 : o.titleGap || (ta.title && ta.title.gap) || 15,
taTitleOrientation = o.titleOrientation || (ta.title && ta.title.orientation) || "axis",
taMajorTick = this.chart.theme.getTick("major", o),
taMinorTick = this.chart.theme.getTick("minor", o),
taMicroTick = this.chart.theme.getTick("micro", o),
taStroke = "stroke" in o ? o.stroke : ta.stroke,
size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
cosr = Math.abs(Math.cos(rotation * Math.PI / 180)),
sinr = Math.abs(Math.sin(rotation * Math.PI / 180)),
tsize = taTitleFont ? g.normalizedLength(g.splitFontString(taTitleFont).size) : 0;
if (rotation < 0) {
rotation += 360;
}
var cachedLabelW = this._getMaxLabelSize();
cachedLabelW = cachedLabelW && cachedLabelW.majLabelW;
titleOffset = size * cosr + (cachedLabelW || 0) * sinr + labelGap + Math.max(taMajorTick.length > 0 ? taMajorTick.length : 0,
taMinorTick.length > 0 ? taMinorTick.length : 0) +
tsize + taTitleGap;
axisVector = { x: isRtl ? -1 : 1, y: 0 }; // chart mirroring
switch (rotation) {
default:
if (rotation < (90 - centerAnchorLimit)) {
labelOffset.y = leftBottom ? size : 0;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
} else if (rotation < (90 + centerAnchorLimit)) {
labelOffset.x = -size * 0.4;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'x' does not exist on type 'never'.
} else if (rotation < 180) {
labelOffset.y = leftBottom ? 0 : -size;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
} else if (rotation < (270 - centerAnchorLimit)) {
labelOffset.y = leftBottom ? 0 : -size;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
} else if (rotation < (270 + centerAnchorLimit)) {
labelOffset.y = leftBottom ? size * 0.4 : 0;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
} else {
labelOffset.y = leftBottom ? size : 0;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
}
}
titleRotation = (taTitleOrientation && taTitleOrientation == "away") ? 180 : 0;
titlePos.y = offsets.t - titleOffset + (titleRotation ? 0 : tsize);
~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
switch (labelAlign) {
case "start":
~~~~~~~
!!! error TS2678: Type '"start"' is not comparable to type 'undefined'.
labelAlign = "end";
break;
case "end":
~~~~~
!!! error TS2678: Type '"end"' is not comparable to type 'undefined'.
labelAlign = "start";
break;
case "middle":
~~~~~~~~
!!! error TS2678: Type '"middle"' is not comparable to type 'undefined'.
labelOffset.y -= size;
~~~~~~~~~~~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2339: Property 'y' does not exist on type 'never'.
break;
}
let _ = rotation;
}
@@ -2,7 +2,7 @@
// -- operator on any type
var ANY: any;
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj = {x:1,y:null};
class A {
@@ -4,7 +4,7 @@
var ANY: any;
>ANY : Symbol(ANY, Decl(decrementOperatorWithAnyOtherType.ts, 2, 3))
var ANY1;
var ANY1: any;
>ANY1 : Symbol(ANY1, Decl(decrementOperatorWithAnyOtherType.ts, 3, 3))
var ANY2: any[] = ["", ""];
@@ -4,7 +4,7 @@
var ANY: any;
>ANY : any
var ANY1;
var ANY1: any;
>ANY1 : any
var ANY2: any[] = ["", ""];
@@ -52,7 +52,7 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (50 errors) ====
// -- operator on any type
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj: () => {}
@@ -63,7 +63,7 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -1,6 +1,6 @@
//// [decrementOperatorWithAnyOtherTypeInvalidOperations.ts]
// -- operator on any type
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj: () => {}
@@ -11,7 +11,7 @@ function foo(): any {
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -77,22 +77,22 @@ use(x);
use(z0);
>use(z0) : any
>use : (a: any) => any
>z0 : any
>z0 : undefined
use(z1);
>use(z1) : any
>use : (a: any) => any
>z1 : any
>z1 : undefined
use(z2);
>use(z2) : any
>use : (a: any) => any
>z2 : any
>z2 : undefined
use(z3);
>use(z3) : any
>use : (a: any) => any
>z3 : any
>z3 : undefined
var z6;
>z6 : any
@@ -149,7 +149,7 @@ use(y);
use(z6);
>use(z6) : any
>use : (a: any) => any
>z6 : any
>z6 : undefined
var z = false;
>z : boolean
@@ -83,22 +83,22 @@ use(x);
use(z0);
>use(z0) : any
>use : (a: any) => any
>z0 : any
>z0 : undefined
use(z1);
>use(z1) : any
>use : (a: any) => any
>z1 : any
>z1 : undefined
use(z2);
>use(z2) : any
>use : (a: any) => any
>z2 : any
>z2 : undefined
use(z3);
>use(z3) : any
>use : (a: any) => any
>z3 : any
>z3 : undefined
var z6;
>z6 : any
@@ -155,7 +155,7 @@ use(y);
use(z6);
>use(z6) : any
>use : (a: any) => any
>z6 : any
>z6 : undefined
var z = false;
>z : boolean
@@ -1,8 +1,8 @@
//// [es5-asyncFunctionTryStatements.ts]
declare var x, y, z, a, b, c;
declare var x: any, y: any, z: any, a: any, b: any, c: any;
async function tryCatch0() {
var x, y;
var x: any, y: any;
try {
x;
}
@@ -12,7 +12,7 @@ async function tryCatch0() {
}
async function tryCatch1() {
var x, y;
var x: any, y: any;
try {
await x;
}
@@ -22,7 +22,7 @@ async function tryCatch1() {
}
async function tryCatch2() {
var x, y;
var x: any, y: any;
try {
x;
}
@@ -32,7 +32,7 @@ async function tryCatch2() {
}
async function tryCatch3(): Promise<Function> {
var x, y;
var x: any, y: any;
try {
await x;
}
@@ -41,7 +41,7 @@ async function tryCatch3(): Promise<Function> {
}
}
async function tryFinally0() {
var x, y;
var x: any, y: any;
try {
x;
}
@@ -51,7 +51,7 @@ async function tryFinally0() {
}
async function tryFinally1() {
var x, y;
var x: any, y: any;
try {
await x;
}
@@ -61,7 +61,7 @@ async function tryFinally1() {
}
async function tryFinally2() {
var x, y;
var x: any, y: any;
try {
x;
}
@@ -71,7 +71,7 @@ async function tryFinally2() {
}
async function tryCatchFinally0() {
var x, y, z;
var x: any, y: any, z: any;
try {
x;
}
@@ -84,7 +84,7 @@ async function tryCatchFinally0() {
}
async function tryCatchFinally1() {
var x, y, z;
var x: any, y: any, z: any;
try {
await x;
}
@@ -97,7 +97,7 @@ async function tryCatchFinally1() {
}
async function tryCatchFinally2() {
var x, y, z;
var x: any, y: any, z: any;
try {
x;
}
@@ -110,7 +110,7 @@ async function tryCatchFinally2() {
}
async function tryCatchFinally3() {
var x, y, z;
var x: any, y: any, z: any;
try {
x;
}
@@ -1,18 +1,18 @@
=== tests/cases/compiler/es5-asyncFunctionTryStatements.ts ===
declare var x, y, z, a, b, c;
declare var x: any, y: any, z: any, a: any, b: any, c: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 0, 11))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 0, 14))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 0, 17))
>a : Symbol(a, Decl(es5-asyncFunctionTryStatements.ts, 0, 20))
>b : Symbol(b, Decl(es5-asyncFunctionTryStatements.ts, 0, 23))
>c : Symbol(c, Decl(es5-asyncFunctionTryStatements.ts, 0, 26))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 0, 19))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 0, 27))
>a : Symbol(a, Decl(es5-asyncFunctionTryStatements.ts, 0, 35))
>b : Symbol(b, Decl(es5-asyncFunctionTryStatements.ts, 0, 43))
>c : Symbol(c, Decl(es5-asyncFunctionTryStatements.ts, 0, 51))
async function tryCatch0() {
>tryCatch0 : Symbol(tryCatch0, Decl(es5-asyncFunctionTryStatements.ts, 0, 29))
>tryCatch0 : Symbol(tryCatch0, Decl(es5-asyncFunctionTryStatements.ts, 0, 59))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 3, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 3, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 3, 15))
try {
x;
@@ -22,16 +22,16 @@ async function tryCatch0() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 7, 11))
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 3, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 3, 15))
}
}
async function tryCatch1() {
>tryCatch1 : Symbol(tryCatch1, Decl(es5-asyncFunctionTryStatements.ts, 10, 1))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 13, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 13, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 13, 15))
try {
await x;
@@ -41,16 +41,16 @@ async function tryCatch1() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 17, 11))
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 13, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 13, 15))
}
}
async function tryCatch2() {
>tryCatch2 : Symbol(tryCatch2, Decl(es5-asyncFunctionTryStatements.ts, 20, 1))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 23, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 23, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 23, 15))
try {
x;
@@ -60,7 +60,7 @@ async function tryCatch2() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 27, 11))
await y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 23, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 23, 15))
}
}
@@ -69,9 +69,9 @@ async function tryCatch3(): Promise<Function> {
>Promise : Symbol(Promise, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 33, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 33, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 33, 15))
try {
await x;
@@ -87,9 +87,9 @@ async function tryCatch3(): Promise<Function> {
async function tryFinally0() {
>tryFinally0 : Symbol(tryFinally0, Decl(es5-asyncFunctionTryStatements.ts, 40, 1))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 42, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 42, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 42, 15))
try {
x;
@@ -97,16 +97,16 @@ async function tryFinally0() {
}
finally {
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 42, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 42, 15))
}
}
async function tryFinally1() {
>tryFinally1 : Symbol(tryFinally1, Decl(es5-asyncFunctionTryStatements.ts, 49, 1))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 52, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 52, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 52, 15))
try {
await x;
@@ -114,16 +114,16 @@ async function tryFinally1() {
}
finally {
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 52, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 52, 15))
}
}
async function tryFinally2() {
>tryFinally2 : Symbol(tryFinally2, Decl(es5-asyncFunctionTryStatements.ts, 59, 1))
var x, y;
var x: any, y: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 62, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 62, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 62, 15))
try {
x;
@@ -131,17 +131,17 @@ async function tryFinally2() {
}
finally {
await y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 62, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 62, 15))
}
}
async function tryCatchFinally0() {
>tryCatchFinally0 : Symbol(tryCatchFinally0, Decl(es5-asyncFunctionTryStatements.ts, 69, 1))
var x, y, z;
var x: any, y: any, z: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 72, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 72, 10))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 72, 13))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 72, 15))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 72, 23))
try {
x;
@@ -151,21 +151,21 @@ async function tryCatchFinally0() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 76, 11))
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 72, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 72, 15))
}
finally {
z;
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 72, 13))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 72, 23))
}
}
async function tryCatchFinally1() {
>tryCatchFinally1 : Symbol(tryCatchFinally1, Decl(es5-asyncFunctionTryStatements.ts, 82, 1))
var x, y, z;
var x: any, y: any, z: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 85, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 85, 10))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 85, 13))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 85, 15))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 85, 23))
try {
await x;
@@ -175,21 +175,21 @@ async function tryCatchFinally1() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 89, 11))
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 85, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 85, 15))
}
finally {
z;
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 85, 13))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 85, 23))
}
}
async function tryCatchFinally2() {
>tryCatchFinally2 : Symbol(tryCatchFinally2, Decl(es5-asyncFunctionTryStatements.ts, 95, 1))
var x, y, z;
var x: any, y: any, z: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 98, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 98, 10))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 98, 13))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 98, 15))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 98, 23))
try {
x;
@@ -199,21 +199,21 @@ async function tryCatchFinally2() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 102, 11))
await y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 98, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 98, 15))
}
finally {
z;
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 98, 13))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 98, 23))
}
}
async function tryCatchFinally3() {
>tryCatchFinally3 : Symbol(tryCatchFinally3, Decl(es5-asyncFunctionTryStatements.ts, 108, 1))
var x, y, z;
var x: any, y: any, z: any;
>x : Symbol(x, Decl(es5-asyncFunctionTryStatements.ts, 111, 7))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 111, 10))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 111, 13))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 111, 15))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 111, 23))
try {
x;
@@ -223,10 +223,10 @@ async function tryCatchFinally3() {
>e : Symbol(e, Decl(es5-asyncFunctionTryStatements.ts, 115, 11))
y;
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 111, 10))
>y : Symbol(y, Decl(es5-asyncFunctionTryStatements.ts, 111, 15))
}
finally {
await z;
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 111, 13))
>z : Symbol(z, Decl(es5-asyncFunctionTryStatements.ts, 111, 23))
}
}
@@ -1,5 +1,5 @@
=== tests/cases/compiler/es5-asyncFunctionTryStatements.ts ===
declare var x, y, z, a, b, c;
declare var x: any, y: any, z: any, a: any, b: any, c: any;
>x : any
>y : any
>z : any
@@ -10,7 +10,7 @@ declare var x, y, z, a, b, c;
async function tryCatch0() {
>tryCatch0 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -29,7 +29,7 @@ async function tryCatch0() {
async function tryCatch1() {
>tryCatch1 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -49,7 +49,7 @@ async function tryCatch1() {
async function tryCatch2() {
>tryCatch2 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -71,7 +71,7 @@ async function tryCatch3(): Promise<Function> {
>Promise : Promise<T>
>Function : Function
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -91,7 +91,7 @@ async function tryCatch3(): Promise<Function> {
async function tryFinally0() {
>tryFinally0 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -108,7 +108,7 @@ async function tryFinally0() {
async function tryFinally1() {
>tryFinally1 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -126,7 +126,7 @@ async function tryFinally1() {
async function tryFinally2() {
>tryFinally2 : () => Promise<void>
var x, y;
var x: any, y: any;
>x : any
>y : any
@@ -144,7 +144,7 @@ async function tryFinally2() {
async function tryCatchFinally0() {
>tryCatchFinally0 : () => Promise<void>
var x, y, z;
var x: any, y: any, z: any;
>x : any
>y : any
>z : any
@@ -168,7 +168,7 @@ async function tryCatchFinally0() {
async function tryCatchFinally1() {
>tryCatchFinally1 : () => Promise<void>
var x, y, z;
var x: any, y: any, z: any;
>x : any
>y : any
>z : any
@@ -193,7 +193,7 @@ async function tryCatchFinally1() {
async function tryCatchFinally2() {
>tryCatchFinally2 : () => Promise<void>
var x, y, z;
var x: any, y: any, z: any;
>x : any
>y : any
>z : any
@@ -218,7 +218,7 @@ async function tryCatchFinally2() {
async function tryCatchFinally3() {
>tryCatchFinally3 : () => Promise<void>
var x, y, z;
var x: any, y: any, z: any;
>x : any
>y : any
>z : any
@@ -84,7 +84,7 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (81 errors) ====
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
var temp;
var temp: any;
delete --temp ** 3;
~~~~~~~~~~~~~
@@ -1,7 +1,7 @@
//// [exponentiationOperatorSyntaxError2.ts]
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
var temp;
var temp: any;
delete --temp ** 3;
delete ++temp ** 3;
+1 -1
View File
@@ -78,7 +78,7 @@ tests/cases/compiler/expr.ts(242,7): error TS2363: The right-hand side of an ari
}
function f() {
var a;
var a: any;
var n=3;
var s="";
var b=false;
+1 -1
View File
@@ -7,7 +7,7 @@ enum E {
}
function f() {
var a;
var a: any;
var n=3;
var s="";
var b=false;
@@ -18,7 +18,7 @@ tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15):
for (var x in /[a-z]/) { }
for (var x in new Date()) { }
var c, d, e;
var c: any, d: any, e: any;
for (var x in c || d) { }
for (var x in e ? c : d) { }
@@ -15,7 +15,7 @@ for (var x in fn()) { }
for (var x in /[a-z]/) { }
for (var x in new Date()) { }
var c, d, e;
var c: any, d: any, e: any;
for (var x in c || d) { }
for (var x in e ? c : d) { }
+1 -1
View File
@@ -2,7 +2,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of3.ts(2,6): error TS2487: Inva
==== tests/cases/conformance/es6/for-ofStatements/for-of3.ts (1 errors) ====
var v;
var v: any;
for (v++ of []) { }
~~~
!!! error TS2487: Invalid left-hand side in 'for...of' statement.
+1 -1
View File
@@ -1,5 +1,5 @@
//// [for-of3.ts]
var v;
var v: any;
for (v++ of []) { }
//// [for-of3.js]
@@ -1,17 +1,18 @@
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(2,5): error TS7005: Variable 'x' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(3,13): error TS7005: Variable 'foo' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(4,15): error TS7006: Parameter 'k' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(3,5): error TS7034: Variable 'y' implicitly has type 'any' and is referenced in a nested function.
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(4,13): error TS7005: Variable 'foo' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(5,15): error TS7006: Parameter 'k' implicitly has an 'any' type.
==== tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts (3 errors) ====
// this should be an error
var x; // error at "x"
var x; // no error, control flow typed
var y; // error because captured
~
!!! error TS7005: Variable 'x' implicitly has an 'any' type.
declare var foo; // error at "foo"
!!! error TS7034: Variable 'y' implicitly has type 'any' and is referenced in a nested function.
declare var foo; // error at "foo"
~~~
!!! error TS7005: Variable 'foo' implicitly has an 'any' type.
function func(k) { }; //error at "k"
function func(k) { y }; // error at "k"
~
!!! error TS7006: Parameter 'k' implicitly has an 'any' type.
func(x);
@@ -1,8 +1,9 @@
//// [implicitAnyDeclareVariablesWithoutTypeAndInit.ts]
// this should be an error
var x; // error at "x"
declare var foo; // error at "foo"
function func(k) { }; //error at "k"
var x; // no error, control flow typed
var y; // error because captured
declare var foo; // error at "foo"
function func(k) { y }; // error at "k"
func(x);
// this shouldn't be an error
@@ -13,9 +14,10 @@ var x1: any; var y1 = new x1;
//// [implicitAnyDeclareVariablesWithoutTypeAndInit.js]
// this should be an error
var x; // error at "x"
function func(k) { }
; //error at "k"
var x; // no error, control flow typed
var y; // error because captured
function func(k) { y; }
; // error at "k"
func(x);
// this shouldn't be an error
var bar = 3;
@@ -2,7 +2,7 @@
// ++ operator on any type
var ANY: any;
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj = {x:1,y:null};
class A {
@@ -4,7 +4,7 @@
var ANY: any;
>ANY : Symbol(ANY, Decl(incrementOperatorWithAnyOtherType.ts, 2, 3))
var ANY1;
var ANY1: any;
>ANY1 : Symbol(ANY1, Decl(incrementOperatorWithAnyOtherType.ts, 3, 3))
var ANY2: any[] = ["", ""];
@@ -4,7 +4,7 @@
var ANY: any;
>ANY : any
var ANY1;
var ANY1: any;
>ANY1 : any
var ANY2: any[] = ["", ""];
@@ -47,7 +47,7 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (45 errors) ====
// ++ operator on any type
var ANY1;
var ANY1: any;
var ANY2: any[] = [1, 2];
var obj: () => {}
@@ -58,7 +58,7 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -1,6 +1,6 @@
//// [incrementOperatorWithAnyOtherTypeInvalidOperations.ts]
// ++ operator on any type
var ANY1;
var ANY1: any;
var ANY2: any[] = [1, 2];
var obj: () => {}
@@ -11,7 +11,7 @@ function foo(): any {
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -10,15 +10,15 @@ if (true) {
>x0 : any
var obj1 = { x0: x0 };
>obj1 : { x0: any; }
>{ x0: x0 } : { x0: any; }
>x0 : any
>x0 : any
>obj1 : { x0: undefined; }
>{ x0: x0 } : { x0: undefined; }
>x0 : undefined
>x0 : undefined
var obj2 = { x0 };
>obj2 : { x0: any; }
>{ x0 } : { x0: any; }
>x0 : any
>obj2 : { x0: undefined; }
>{ x0 } : { x0: undefined; }
>x0 : undefined
}
var x, y, z;
@@ -5,7 +5,7 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperator
// - operator on any type
var ANY: any;
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj: () => {}
var obj1 = { x: "", y: () => { }};
@@ -16,7 +16,7 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperator
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -2,7 +2,7 @@
// - operator on any type
var ANY: any;
var ANY1;
var ANY1: any;
var ANY2: any[] = ["", ""];
var obj: () => {}
var obj1 = { x: "", y: () => { }};
@@ -13,7 +13,7 @@ function foo(): any {
}
class A {
public a: any;
static foo() {
static foo(): any {
var a;
return a;
}
@@ -31,7 +31,7 @@ function a1() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : undefined
>1 : 1
() => x;
@@ -53,24 +53,24 @@ function a2() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
}
for (let x;;) {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
}
}
@@ -82,14 +82,14 @@ function a3() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
}
switch (1) {
@@ -111,14 +111,14 @@ function a4() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
() => x;
@@ -145,14 +145,14 @@ function a5() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
() => x;
@@ -5,24 +5,24 @@ function a0() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
}
for (let x;;) {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
}
}
@@ -33,14 +33,14 @@ function a1() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
() => x;
@@ -51,10 +51,10 @@ function a1() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
}
}
@@ -65,24 +65,24 @@ function a2() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
}
for (let x;;) {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
() => x;
@@ -98,14 +98,14 @@ function a3() {
for (let x; x < 1;) {
>x : any
>x < 1 : boolean
>x : any
>x : number
>1 : 1
x = x + 1;
>x = x + 1 : any
>x : any
>x + 1 : any
>x = x + 1 : number
>x : any
>x + 1 : number
>x : number
>1 : 1
() => x;
@@ -116,10 +116,10 @@ function a3() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
() => x;
@@ -18,10 +18,10 @@ function a0() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
}
}
@@ -49,10 +49,10 @@ function a1() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
}
}
@@ -76,10 +76,10 @@ function a2() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
() => x;
@@ -111,10 +111,10 @@ function a3() {
>x : any
x = x + 2;
>x = x + 2 : any
>x : any
>x + 2 : any
>x = x + 2 : number
>x : any
>x + 2 : number
>x : number
>2 : 2
() => x;
@@ -2,8 +2,6 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,15): error TS7005: Variable 'c' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,18): error TS7005: Variable 'd' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer.
@@ -22,7 +20,7 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,62): error TS
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS7031: Binding element 'a5' implicitly has an 'any' type.
==== tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts (22 errors) ====
==== tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts (20 errors) ====
var [a], {b}, c, d; // error
~~~
!!! error TS1182: A destructuring declaration must have an initializer.
@@ -32,10 +30,6 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS
!!! error TS1182: A destructuring declaration must have an initializer.
~
!!! error TS7031: Binding element 'b' implicitly has an 'any' type.
~
!!! error TS7005: Variable 'c' implicitly has an 'any' type.
~
!!! error TS7005: Variable 'd' implicitly has an 'any' type.
var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error
~~~~~~~~~~~~~~~~
@@ -1,11 +1,10 @@
tests/cases/compiler/noImplicitAnyForIn.ts(8,18): error TS7017: Index signature of object type implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyForIn.ts(15,18): error TS7017: Index signature of object type implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyForIn.ts(21,9): error TS7005: Variable 'b' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyForIn.ts(29,5): error TS7005: Variable 'n' implicitly has an 'any[][]' type.
tests/cases/compiler/noImplicitAnyForIn.ts(31,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
==== tests/cases/compiler/noImplicitAnyForIn.ts (5 errors) ====
==== tests/cases/compiler/noImplicitAnyForIn.ts (4 errors) ====
var x: {}[] = [[1, 2, 3], ["hello"]];
@@ -31,8 +30,6 @@ tests/cases/compiler/noImplicitAnyForIn.ts(31,6): error TS2405: The left-hand si
for (var a in x) {
// Should yield an implicit 'any' error.
var b;
~
!!! error TS7005: Variable 'b' implicitly has an 'any' type.
var c = a || b;
}
@@ -5,35 +5,35 @@ var a, b, c;
>c : any
var x1 = {
>x1 : { a: any; }
>{ a} : { a: any; }
>x1 : { a: undefined; }
>{ a} : { a: undefined; }
a
>a : any
>a : undefined
};
var x2 = {
>x2 : { a: any; }
>{ a,} : { a: any; }
>x2 : { a: undefined; }
>{ a,} : { a: undefined; }
a,
>a : any
>a : undefined
}
var x3 = {
>x3 : any
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: undefined; c: undefined; d(): void; x3: any; parent: any; }
a: 0,
>a : number
>0 : 0
b,
>b : any
>b : undefined
c,
>c : any
>c : undefined
d() { },
>d : () => void
@@ -5,35 +5,35 @@ var a, b, c;
>c : any
var x1 = {
>x1 : { a: any; }
>{ a} : { a: any; }
>x1 : { a: undefined; }
>{ a} : { a: undefined; }
a
>a : any
>a : undefined
};
var x2 = {
>x2 : { a: any; }
>{ a,} : { a: any; }
>x2 : { a: undefined; }
>{ a,} : { a: undefined; }
a,
>a : any
>a : undefined
}
var x3 = {
>x3 : any
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: undefined; c: undefined; d(): void; x3: any; parent: any; }
a: 0,
>a : number
>0 : 0
b,
>b : any
>b : undefined
c,
>c : any
>c : undefined
d() { },
>d : () => void
@@ -10,12 +10,12 @@ function f1() {
if (a < b || b > (c + 1)) { }
>a < b || b > (c + 1) : boolean
>a < b : boolean
>a : any
>b : any
>a : undefined
>b : undefined
>b > (c + 1) : boolean
>b : any
>(c + 1) : any
>c + 1 : any
>c : any
>b : undefined
>(c + 1) : number
>c + 1 : number
>c : undefined
>1 : 1
}
@@ -10,12 +10,12 @@ function f() {
if (a < b && b > (c + 1)) { }
>a < b && b > (c + 1) : boolean
>a < b : boolean
>a : any
>b : any
>a : undefined
>b : undefined
>b > (c + 1) : boolean
>b : any
>(c + 1) : any
>c + 1 : any
>c : any
>b : undefined
>(c + 1) : number
>c + 1 : number
>c : undefined
>1 : 1
}
@@ -10,13 +10,13 @@ function f() {
if (a < b && b < (c + 1)) { }
>a < b && b < (c + 1) : boolean
>a < b : boolean
>a : any
>b : any
>a : undefined
>b : undefined
>b < (c + 1) : boolean
>b : any
>(c + 1) : any
>c + 1 : any
>c : any
>b : undefined
>(c + 1) : number
>c + 1 : number
>c : undefined
>1 : 1
}
+8 -8
View File
@@ -61,7 +61,7 @@ var selfClosed7 = <div x={p} y='p' />;
><div x={p} y='p' /> : JSX.Element
>div : any
>x : any
>p : any
>p : undefined
>y : any
var openClosed1 = <div></div>;
@@ -82,7 +82,7 @@ var openClosed3 = <div n='m'>{p}</div>;
><div n='m'>{p}</div> : JSX.Element
>div : any
>n : any
>p : any
>p : undefined
>div : any
var openClosed4 = <div n='m'>{p < p}</div>;
@@ -91,8 +91,8 @@ var openClosed4 = <div n='m'>{p < p}</div>;
>div : any
>n : any
>p < p : boolean
>p : any
>p : any
>p : undefined
>p : undefined
>div : any
var openClosed5 = <div n='m'>{p > p}</div>;
@@ -101,8 +101,8 @@ var openClosed5 = <div n='m'>{p > p}</div>;
>div : any
>n : any
>p > p : boolean
>p : any
>p : any
>p : undefined
>p : undefined
>div : any
class SomeClass {
@@ -180,7 +180,7 @@ var whitespace2 = <div> {p} </div>;
>whitespace2 : JSX.Element
><div> {p} </div> : JSX.Element
>div : any
>p : any
>p : undefined
>div : any
var whitespace3 = <div>
@@ -189,7 +189,7 @@ var whitespace3 = <div>
>div : any
{p}
>p : any
>p : undefined
</div>;
>div : any
+14 -14
View File
@@ -22,16 +22,16 @@ var spreads1 = <div {...p1}>{p2}</div>;
>spreads1 : JSX.Element
><div {...p1}>{p2}</div> : JSX.Element
>div : any
>p1 : any
>p2 : any
>p1 : undefined
>p2 : undefined
>div : any
var spreads2 = <div {...p1}>{p2}</div>;
>spreads2 : JSX.Element
><div {...p1}>{p2}</div> : JSX.Element
>div : any
>p1 : any
>p2 : any
>p1 : undefined
>p2 : undefined
>div : any
var spreads3 = <div x={p3} {...p1}>{p2}</div>;
@@ -39,19 +39,19 @@ var spreads3 = <div x={p3} {...p1}>{p2}</div>;
><div x={p3} {...p1}>{p2}</div> : JSX.Element
>div : any
>x : any
>p3 : any
>p1 : any
>p2 : any
>p3 : undefined
>p1 : undefined
>p2 : undefined
>div : any
var spreads4 = <div {...p1} x={p3} >{p2}</div>;
>spreads4 : JSX.Element
><div {...p1} x={p3} >{p2}</div> : JSX.Element
>div : any
>p1 : any
>p1 : undefined
>x : any
>p3 : any
>p2 : any
>p3 : undefined
>p2 : undefined
>div : any
var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
@@ -59,10 +59,10 @@ var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
><div x={p2} {...p1} y={p3}>{p2}</div> : JSX.Element
>div : any
>x : any
>p2 : any
>p1 : any
>p2 : undefined
>p1 : undefined
>y : any
>p3 : any
>p2 : any
>p3 : undefined
>p2 : undefined
>div : any
@@ -3,7 +3,7 @@ declare module JSX {
interface Element { isElement; }
}
var T, T1, T2;
var T: any, T1: any, T2: any;
// This is an element
var x1 = <T>() => {}</T>;
@@ -7,10 +7,10 @@ declare module JSX {
>isElement : Symbol(Element.isElement, Decl(file.tsx, 1, 20))
}
var T, T1, T2;
var T: any, T1: any, T2: any;
>T : Symbol(T, Decl(file.tsx, 4, 3))
>T1 : Symbol(T1, Decl(file.tsx, 4, 6))
>T2 : Symbol(T2, Decl(file.tsx, 4, 10))
>T1 : Symbol(T1, Decl(file.tsx, 4, 11))
>T2 : Symbol(T2, Decl(file.tsx, 4, 20))
// This is an element
var x1 = <T>() => {}</T>;
@@ -7,7 +7,7 @@ declare module JSX {
>isElement : any
}
var T, T1, T2;
var T: any, T1: any, T2: any;
>T : any
>T1 : any
>T2 : any
@@ -63,7 +63,7 @@ var selfClosed7 = <div x={p} y='p' b />;
><div x={p} y='p' b /> : JSX.Element
>div : any
>x : any
>p : any
>p : undefined
>y : any
>b : any
@@ -85,7 +85,7 @@ var openClosed3 = <div n='m'>{p}</div>;
><div n='m'>{p}</div> : JSX.Element
>div : any
>n : any
>p : any
>p : undefined
>div : any
var openClosed4 = <div n='m'>{p < p}</div>;
@@ -94,8 +94,8 @@ var openClosed4 = <div n='m'>{p < p}</div>;
>div : any
>n : any
>p < p : boolean
>p : any
>p : any
>p : undefined
>p : undefined
>div : any
var openClosed5 = <div n='m' b>{p > p}</div>;
@@ -105,8 +105,8 @@ var openClosed5 = <div n='m' b>{p > p}</div>;
>n : any
>b : any
>p > p : boolean
>p : any
>p : any
>p : undefined
>p : undefined
>div : any
class SomeClass {
@@ -184,7 +184,7 @@ var whitespace2 = <div> {p} </div>;
>whitespace2 : JSX.Element
><div> {p} </div> : JSX.Element
>div : any
>p : any
>p : undefined
>div : any
var whitespace3 = <div>
@@ -193,7 +193,7 @@ var whitespace3 = <div>
>div : any
{p}
>p : any
>p : undefined
</div>;
>div : any
+14 -14
View File
@@ -24,16 +24,16 @@ var spreads1 = <div {...p1}>{p2}</div>;
>spreads1 : JSX.Element
><div {...p1}>{p2}</div> : JSX.Element
>div : any
>p1 : any
>p2 : any
>p1 : undefined
>p2 : undefined
>div : any
var spreads2 = <div {...p1}>{p2}</div>;
>spreads2 : JSX.Element
><div {...p1}>{p2}</div> : JSX.Element
>div : any
>p1 : any
>p2 : any
>p1 : undefined
>p2 : undefined
>div : any
var spreads3 = <div x={p3} {...p1}>{p2}</div>;
@@ -41,19 +41,19 @@ var spreads3 = <div x={p3} {...p1}>{p2}</div>;
><div x={p3} {...p1}>{p2}</div> : JSX.Element
>div : any
>x : any
>p3 : any
>p1 : any
>p2 : any
>p3 : undefined
>p1 : undefined
>p2 : undefined
>div : any
var spreads4 = <div {...p1} x={p3} >{p2}</div>;
>spreads4 : JSX.Element
><div {...p1} x={p3} >{p2}</div> : JSX.Element
>div : any
>p1 : any
>p1 : undefined
>x : any
>p3 : any
>p2 : any
>p3 : undefined
>p2 : undefined
>div : any
var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
@@ -61,10 +61,10 @@ var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
><div x={p2} {...p1} y={p3}>{p2}</div> : JSX.Element
>div : any
>x : any
>p2 : any
>p1 : any
>p2 : undefined
>p1 : undefined
>y : any
>p3 : any
>p2 : any
>p3 : undefined
>p2 : undefined
>div : any
@@ -32,6 +32,6 @@ var spread1 = <div x='' {...foo} y='' />;
><div x='' {...foo} y='' /> : JSX.Element
>div : any
>x : any
>foo : any
>foo : undefined
>y : any
@@ -35,7 +35,7 @@ namespace M {
><div x='' {...foo} y='' /> : JSX.Element
>div : any
>x : any
>foo : any
>foo : undefined
>y : any
// Quotes
@@ -4,9 +4,10 @@ tests/cases/compiler/unusedSwitchStatment.ts(7,15): error TS6133: 'c' is declare
tests/cases/compiler/unusedSwitchStatment.ts(10,13): error TS6133: 'z' is declared but never used.
tests/cases/compiler/unusedSwitchStatment.ts(15,10): error TS2678: Type '0' is not comparable to type '2'.
tests/cases/compiler/unusedSwitchStatment.ts(17,10): error TS2678: Type '1' is not comparable to type '2'.
tests/cases/compiler/unusedSwitchStatment.ts(18,9): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
==== tests/cases/compiler/unusedSwitchStatment.ts (6 errors) ====
==== tests/cases/compiler/unusedSwitchStatment.ts (7 errors) ====
switch (1) {
case 0:
@@ -37,4 +38,6 @@ tests/cases/compiler/unusedSwitchStatment.ts(17,10): error TS2678: Type '1' is n
~
!!! error TS2678: Type '1' is not comparable to type '2'.
x++;
~
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
}