Update baselines

This commit is contained in:
Nathan Shively-Sanders
2017-03-29 16:12:20 -07:00
parent 650cc29219
commit 3624417a32
15 changed files with 99 additions and 51 deletions

View File

@@ -0,0 +1,21 @@
tests/cases/compiler/extendFromAny.ts(8,9): error TS2339: Property 'length' does not exist on type 'number'.
tests/cases/compiler/extendFromAny.ts(9,10): error TS2339: Property 'length' does not exist on type 'number'.
==== tests/cases/compiler/extendFromAny.ts (2 errors) ====
declare var Base: any;
class C extends Base {
known = 1;
static sknown = 2;
}
let c = new C();
c.known.length; // error, 'real' has no 'length' property
~~~~~~
!!! error TS2339: Property 'length' does not exist on type 'number'.
C.sknown.length; // error, 'sreal' has no 'length' property
~~~~~~
!!! error TS2339: Property 'length' does not exist on type 'number'.
c.unknown.length; // ok, fake: any
C.sunknown.length; // ok: sfake: any

View File

@@ -0,0 +1,40 @@
//// [extendFromAny.ts]
declare var Base: any;
class C extends Base {
known = 1;
static sknown = 2;
}
let c = new C();
c.known.length; // error, 'real' has no 'length' property
C.sknown.length; // error, 'sreal' has no 'length' property
c.unknown.length; // ok, fake: any
C.sunknown.length; // ok: sfake: any
//// [extendFromAny.js]
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.known = 1;
return _this;
}
return C;
}(Base));
C.sknown = 2;
var c = new C();
c.known.length; // error, 'real' has no 'length' property
C.sknown.length; // error, 'sreal' has no 'length' property
c.unknown.length; // ok, fake: any
C.sunknown.length; // ok: sfake: any

View File

@@ -1,14 +0,0 @@
/a.ts(2,17): error TS2507: Type 'any' is not a constructor function type.
==== /a.ts (1 errors) ====
import Foo from "foo";
class A extends Foo { }
~~~
!!! error TS2507: Type 'any' is not a constructor function type.
==== /node_modules/foo/index.js (0 errors) ====
// Test that extending an untyped module is an error, unlike extending unknownSymbol.
This file is not read.

View File

@@ -0,0 +1,8 @@
=== /a.ts ===
import Foo from "foo";
>Foo : Symbol(Foo, Decl(a.ts, 0, 6))
class A extends Foo { }
>A : Symbol(A, Decl(a.ts, 0, 22))
>Foo : Symbol(Foo, Decl(a.ts, 0, 6))

View File

@@ -0,0 +1,8 @@
=== /a.ts ===
import Foo from "foo";
>Foo : any
class A extends Foo { }
>A : A
>Foo : any

View File

@@ -1,12 +1,9 @@
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,21): error TS2507: Type 'any' is not a constructor function type.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts (2 errors) ====
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts (1 errors) ====
function* g() {
class C extends (yield 0) { }
~~~~~~~~~
!!! error TS2507: Type 'any' is not a constructor function type.
~~~~~
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
}

View File

@@ -1,12 +1,9 @@
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts(2,29): error TS2507: Type 'any' is not a constructor function type.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts(2,30): error TS1163: A 'yield' expression is only allowed in a generator body.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts (2 errors) ====
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts (1 errors) ====
function* g() {
var x = class C extends (yield) {};
~~~~~~~
!!! error TS2507: Type 'any' is not a constructor function type.
~~~~~
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
}

View File

@@ -1,12 +1,9 @@
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,21): error TS2507: Type 'any' is not a constructor function type.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts (2 errors) ====
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts (1 errors) ====
function* g() {
class C extends (yield) {};
~~~~~~~
!!! error TS2507: Type 'any' is not a constructor function type.
~~~~~
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
}

View File

@@ -1,4 +1,5 @@
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(1,17): error TS2304: Cannot find name 'A'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(1,19): error TS2304: Cannot find name 'T'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(1,33): error TS2304: Cannot find name 'B'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(4,9): error TS2315: Type 'C' is not generic.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(5,9): error TS2304: Cannot find name 'D'.
@@ -9,10 +10,12 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts(14,16): error TS2304: Cannot find name 'F'.
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts (9 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts (10 errors) ====
class C extends A<T> implements B<T> {
~
!!! error TS2304: Cannot find name 'A'.
~
!!! error TS2304: Cannot find name 'T'.
~
!!! error TS2304: Cannot find name 'B'.
}

View File

@@ -1,4 +1,6 @@
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(1,17): error TS2304: Cannot find name 'A'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(1,19): error TS2304: Cannot find name 'X'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(1,25): error TS2304: Cannot find name 'Y'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(1,45): error TS2304: Cannot find name 'B'.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(4,9): error TS2315: Type 'C' is not generic.
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(5,9): error TS2304: Cannot find name 'D'.
@@ -9,10 +11,14 @@ tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts
tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts(14,16): error TS2304: Cannot find name 'F'.
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts (9 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts (11 errors) ====
class C extends A<X<T>, Y<Z<T>>> implements B<X<T>, Y<Z<T>>> {
~
!!! error TS2304: Cannot find name 'A'.
~
!!! error TS2304: Cannot find name 'X'.
~
!!! error TS2304: Cannot find name 'Y'.
~
!!! error TS2304: Cannot find name 'B'.
}

View File

@@ -1,10 +1,9 @@
tests/cases/compiler/recursiveBaseCheck3.ts(1,7): error TS2506: 'A' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck3.ts(1,20): error TS2449: Class 'C' used before its declaration.
tests/cases/compiler/recursiveBaseCheck3.ts(2,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah' does not exist on type 'C<{}>'.
==== tests/cases/compiler/recursiveBaseCheck3.ts (4 errors) ====
==== tests/cases/compiler/recursiveBaseCheck3.ts (3 errors) ====
class A<T> extends C<T> { }
~
!!! error TS2506: 'A' is referenced directly or indirectly in its own base expression.
@@ -14,6 +13,4 @@ tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah'
~
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
(new C).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'C<{}>'.
(new C).blah;

View File

@@ -1,11 +1,8 @@
tests/cases/compiler/recursiveBaseCheck4.ts(1,7): error TS2506: 'M' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck4.ts(2,9): error TS2339: Property 'blah' does not exist on type 'M<{}>'.
==== tests/cases/compiler/recursiveBaseCheck4.ts (2 errors) ====
==== tests/cases/compiler/recursiveBaseCheck4.ts (1 errors) ====
class M<T> extends M<string> { }
~
!!! error TS2506: 'M' is referenced directly or indirectly in its own base expression.
(new M).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'M<{}>'.
(new M).blah;

View File

@@ -1,11 +1,8 @@
tests/cases/compiler/recursiveBaseCheck6.ts(1,7): error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck6.ts(2,13): error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
==== tests/cases/compiler/recursiveBaseCheck6.ts (2 errors) ====
==== tests/cases/compiler/recursiveBaseCheck6.ts (1 errors) ====
class S18<A> extends S18<{ S19: A; }>{ }
~~~
!!! error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
(new S18()).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
(new S18()).blah;

View File

@@ -3,12 +3,11 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,15):
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS2507: Type 'any' is not a constructor function type.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (8 errors) ====
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (7 errors) ====
//'this' in static member initializer
class ErrClass1 {
static t = this; // Error
@@ -57,8 +56,6 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9):
!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface.
class ErrClass3 extends this {
~~~~
!!! error TS2507: Type 'any' is not a constructor function type.
}

View File

@@ -3,12 +3,11 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS2507: Type 'any' is not a constructor function type.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(44,9): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (8 errors) ====
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (7 errors) ====
//'this' in static member initializer
class ErrClass1 {
static t = this; // Error
@@ -57,8 +56,6 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface.
class ErrClass3 extends this {
~~~~
!!! error TS2507: Type 'any' is not a constructor function type.
}