Add baselines
This commit is contained in:
parent
c5e6913ede
commit
b1b0a821f2
4 changed files with 146 additions and 0 deletions
30
tests/baselines/reference/quotedConstructors.errors.txt
Normal file
30
tests/baselines/reference/quotedConstructors.errors.txt
Normal file
|
@ -0,0 +1,30 @@
|
|||
tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(2,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(6,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(14,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts (3 errors) ====
|
||||
class C {
|
||||
"constructor"() {} // Error in 3.5
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
}
|
||||
|
||||
class D {
|
||||
'constructor'() {} // Error in 3.5
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
}
|
||||
|
||||
class E {
|
||||
['constructor']() {}
|
||||
}
|
||||
|
||||
new class {
|
||||
"constructor"() {} // Error in 3.5
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method.
|
||||
};
|
||||
|
||||
var o = { "constructor"() {} };
|
||||
|
46
tests/baselines/reference/quotedConstructors.js
Normal file
46
tests/baselines/reference/quotedConstructors.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
//// [quotedConstructors.ts]
|
||||
class C {
|
||||
"constructor"() {} // Error in 3.5
|
||||
}
|
||||
|
||||
class D {
|
||||
'constructor'() {} // Error in 3.5
|
||||
}
|
||||
|
||||
class E {
|
||||
['constructor']() {}
|
||||
}
|
||||
|
||||
new class {
|
||||
"constructor"() {} // Error in 3.5
|
||||
};
|
||||
|
||||
var o = { "constructor"() {} };
|
||||
|
||||
|
||||
//// [quotedConstructors.js]
|
||||
var C = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype["constructor"] = function () { }; // Error in 3.5
|
||||
return C;
|
||||
}());
|
||||
var D = /** @class */ (function () {
|
||||
function D() {
|
||||
}
|
||||
D.prototype['constructor'] = function () { }; // Error in 3.5
|
||||
return D;
|
||||
}());
|
||||
var E = /** @class */ (function () {
|
||||
function E() {
|
||||
}
|
||||
E.prototype['constructor'] = function () { };
|
||||
return E;
|
||||
}());
|
||||
new /** @class */ (function () {
|
||||
function class_1() {
|
||||
}
|
||||
class_1.prototype["constructor"] = function () { }; // Error in 3.5
|
||||
return class_1;
|
||||
}());
|
||||
var o = { "constructor": function () { } };
|
33
tests/baselines/reference/quotedConstructors.symbols
Normal file
33
tests/baselines/reference/quotedConstructors.symbols
Normal file
|
@ -0,0 +1,33 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts ===
|
||||
class C {
|
||||
>C : Symbol(C, Decl(quotedConstructors.ts, 0, 0))
|
||||
|
||||
"constructor"() {} // Error in 3.5
|
||||
>"constructor" : Symbol(C["constructor"], Decl(quotedConstructors.ts, 0, 9))
|
||||
}
|
||||
|
||||
class D {
|
||||
>D : Symbol(D, Decl(quotedConstructors.ts, 2, 1))
|
||||
|
||||
'constructor'() {} // Error in 3.5
|
||||
>'constructor' : Symbol(D['constructor'], Decl(quotedConstructors.ts, 4, 9))
|
||||
}
|
||||
|
||||
class E {
|
||||
>E : Symbol(E, Decl(quotedConstructors.ts, 6, 1))
|
||||
|
||||
['constructor']() {}
|
||||
>['constructor'] : Symbol(E['constructor'], Decl(quotedConstructors.ts, 8, 9))
|
||||
>'constructor' : Symbol(E['constructor'], Decl(quotedConstructors.ts, 8, 9))
|
||||
}
|
||||
|
||||
new class {
|
||||
"constructor"() {} // Error in 3.5
|
||||
>"constructor" : Symbol((Anonymous class)["constructor"], Decl(quotedConstructors.ts, 12, 11))
|
||||
|
||||
};
|
||||
|
||||
var o = { "constructor"() {} };
|
||||
>o : Symbol(o, Decl(quotedConstructors.ts, 16, 3))
|
||||
>"constructor" : Symbol("constructor", Decl(quotedConstructors.ts, 16, 9))
|
||||
|
37
tests/baselines/reference/quotedConstructors.types
Normal file
37
tests/baselines/reference/quotedConstructors.types
Normal file
|
@ -0,0 +1,37 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
"constructor"() {} // Error in 3.5
|
||||
>"constructor" : () => void
|
||||
}
|
||||
|
||||
class D {
|
||||
>D : D
|
||||
|
||||
'constructor'() {} // Error in 3.5
|
||||
>'constructor' : () => void
|
||||
}
|
||||
|
||||
class E {
|
||||
>E : E
|
||||
|
||||
['constructor']() {}
|
||||
>['constructor'] : () => void
|
||||
>'constructor' : "constructor"
|
||||
}
|
||||
|
||||
new class {
|
||||
>new class { "constructor"() {} // Error in 3.5} : (Anonymous class)
|
||||
>class { "constructor"() {} // Error in 3.5} : typeof (Anonymous class)
|
||||
|
||||
"constructor"() {} // Error in 3.5
|
||||
>"constructor" : () => void
|
||||
|
||||
};
|
||||
|
||||
var o = { "constructor"() {} };
|
||||
>o : { "constructor"(): void; }
|
||||
>{ "constructor"() {} } : { "constructor"(): void; }
|
||||
>"constructor" : () => void
|
||||
|
Loading…
Reference in a new issue