Skip to content

Commit

Permalink
Add the baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jun 30, 2021
1 parent 199451d commit de18a80
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(2,9): error TS1028: Accessibility modifier already seen.
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(3,10): error TS1028: Accessibility modifier already seen.
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(4,9): error TS1030: 'static' modifier already seen.
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(5,9): error TS1028: Accessibility modifier already seen.
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(6,10): error TS1028: Accessibility modifier already seen.
tests/cases/compiler/multipleClassPropertyModifiersErrors.ts(4,16): error TS1005: ';' expected.


==== tests/cases/compiler/multipleClassPropertyModifiersErrors.ts (5 errors) ====
==== tests/cases/compiler/multipleClassPropertyModifiersErrors.ts (1 errors) ====
class C {
public public p1;
~~~~~~
!!! error TS1028: Accessibility modifier already seen.
private private p2;
~~~~~~~
!!! error TS1028: Accessibility modifier already seen.
static static p3;
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~~
!!! error TS1005: ';' expected.
public private p4;
~~~~~~~
!!! error TS1028: Accessibility modifier already seen.
private public p5;
~~~~~~
!!! error TS1028: Accessibility modifier already seen.
public static p6;
private static p7;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class C {
>p2 : Symbol(C.p2, Decl(multipleClassPropertyModifiersErrors.ts, 1, 18))

static static p3;
>p3 : Symbol(C.p3, Decl(multipleClassPropertyModifiersErrors.ts, 2, 20))
>static : Symbol(C.static, Decl(multipleClassPropertyModifiersErrors.ts, 2, 20))
>p3 : Symbol(C.p3, Decl(multipleClassPropertyModifiersErrors.ts, 3, 14))

public private p4;
>p4 : Symbol(C.p4, Decl(multipleClassPropertyModifiersErrors.ts, 3, 18))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class C {
>p2 : any

static static p3;
>static : any
>p3 : any

public private p4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts(2,11): error TS1030: 'static' modifier already seen.
tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts(2,18): error TS1005: ';' expected.


==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts (1 errors) ====
class C {
static static [x: string]: string;
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~
!!! error TS1005: ';' expected.
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : Symbol(C, Decl(parserIndexMemberDeclaration10.ts, 0, 0))

static static [x: string]: string;
>static : Symbol(C.static, Decl(parserIndexMemberDeclaration10.ts, 0, 9))
>x : Symbol(x, Decl(parserIndexMemberDeclaration10.ts, 1, 18))
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : C

static static [x: string]: string;
>static : any
>x : string
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration8.ts(2,12): error TS1030: 'static' modifier already seen.
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration8.ts(2,19): error TS1005: ';' expected.
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration8.ts(2,23): error TS2378: A 'get' accessor must return a value.


==== tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration8.ts (2 errors) ====
class C {
static static get Foo() { }
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~~~
!!! error TS1005: ';' expected.
~~~
!!! error TS2378: A 'get' accessor must return a value.
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class C {
var C = /** @class */ (function () {
function C() {
}
Object.defineProperty(C, "Foo", {
Object.defineProperty(C.prototype, "Foo", {
get: function () { },
enumerable: false,
configurable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : Symbol(C, Decl(parserMemberAccessorDeclaration8.ts, 0, 0))

static static get Foo() { }
>Foo : Symbol(C.Foo, Decl(parserMemberAccessorDeclaration8.ts, 0, 9))
>static : Symbol(C.static, Decl(parserMemberAccessorDeclaration8.ts, 0, 9))
>Foo : Symbol(C.Foo, Decl(parserMemberAccessorDeclaration8.ts, 1, 17))
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : C

static static get Foo() { }
>static : any
>Foo : void
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration2.ts(2,12): error TS1030: 'static' modifier already seen.
tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration2.ts(2,19): error TS1005: ';' expected.


==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration2.ts (1 errors) ====
class C {
static static Foo() { }
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~~~
!!! error TS1005: ';' expected.
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ class C {
var C = /** @class */ (function () {
function C() {
}
C.Foo = function () { };
C.prototype.Foo = function () { };
return C;
}());
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : Symbol(C, Decl(parserMemberFunctionDeclaration2.ts, 0, 0))

static static Foo() { }
>Foo : Symbol(C.Foo, Decl(parserMemberFunctionDeclaration2.ts, 0, 9))
>static : Symbol(C.static, Decl(parserMemberFunctionDeclaration2.ts, 0, 9))
>Foo : Symbol(C.Foo, Decl(parserMemberFunctionDeclaration2.ts, 1, 17))
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : C

static static Foo() { }
>static : any
>Foo : () => void
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration2.ts(2,10): error TS1030: 'static' modifier already seen.
tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration2.ts(2,17): error TS1005: ';' expected.


==== tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration2.ts (1 errors) ====
class C {
static static Foo;
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~~~
!!! error TS1005: ';' expected.
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : Symbol(C, Decl(parserMemberVariableDeclaration2.ts, 0, 0))

static static Foo;
>Foo : Symbol(C.Foo, Decl(parserMemberVariableDeclaration2.ts, 0, 9))
>static : Symbol(C.static, Decl(parserMemberVariableDeclaration2.ts, 0, 9))
>Foo : Symbol(C.Foo, Decl(parserMemberVariableDeclaration2.ts, 1, 15))
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class C {
>C : C

static static Foo;
>static : any
>Foo : any
}
27 changes: 21 additions & 6 deletions tests/baselines/reference/staticAsIdentifier.errors.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tests/cases/compiler/staticAsIdentifier.ts(12,12): error TS1030: 'static' modifier already seen.
tests/cases/compiler/staticAsIdentifier.ts(16,12): error TS1030: 'static' modifier already seen.
tests/cases/compiler/staticAsIdentifier.ts(12,19): error TS1005: ';' expected.
tests/cases/compiler/staticAsIdentifier.ts(16,19): error TS1005: ';' expected.


==== tests/cases/compiler/staticAsIdentifier.ts (2 errors) ====
Expand All @@ -15,13 +15,28 @@ tests/cases/compiler/staticAsIdentifier.ts(16,12): error TS1030: 'static' modifi

class C3 {
static static p: string;
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~
!!! error TS1005: ';' expected.
}

class C4 {
static static foo() {}
~~~~~~
!!! error TS1030: 'static' modifier already seen.
~~~
!!! error TS1005: ';' expected.
}

class C5 {
static static
}

class C6 {
static
static
}

class C7 extends C6 {
static override static
}



49 changes: 48 additions & 1 deletion tests/baselines/reference/staticAsIdentifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,39 @@ class C3 {
class C4 {
static static foo() {}
}

class C5 {
static static
}

class C6 {
static
static
}

class C7 extends C6 {
static override static
}




//// [staticAsIdentifier.js]
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var C1 = /** @class */ (function () {
function C1() {
}
Expand All @@ -38,6 +68,23 @@ var C3 = /** @class */ (function () {
var C4 = /** @class */ (function () {
function C4() {
}
C4.foo = function () { };
C4.prototype.foo = function () { };
return C4;
}());
var C5 = /** @class */ (function () {
function C5() {
}
return C5;
}());
var C6 = /** @class */ (function () {
function C6() {
}
return C6;
}());
var C7 = /** @class */ (function (_super) {
__extends(C7, _super);
function C7() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
}(C6));
31 changes: 29 additions & 2 deletions tests/baselines/reference/staticAsIdentifier.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,40 @@ class C3 {
>C3 : Symbol(C3, Decl(staticAsIdentifier.ts, 8, 1))

static static p: string;
>p : Symbol(C3.p, Decl(staticAsIdentifier.ts, 10, 10))
>static : Symbol(C3.static, Decl(staticAsIdentifier.ts, 10, 10))
>p : Symbol(C3.p, Decl(staticAsIdentifier.ts, 11, 17))
}

class C4 {
>C4 : Symbol(C4, Decl(staticAsIdentifier.ts, 12, 1))

static static foo() {}
>foo : Symbol(C4.foo, Decl(staticAsIdentifier.ts, 14, 10))
>static : Symbol(C4.static, Decl(staticAsIdentifier.ts, 14, 10))
>foo : Symbol(C4.foo, Decl(staticAsIdentifier.ts, 15, 17))
}

class C5 {
>C5 : Symbol(C5, Decl(staticAsIdentifier.ts, 16, 1))

static static
>static : Symbol(C5.static, Decl(staticAsIdentifier.ts, 18, 10))
}

class C6 {
>C6 : Symbol(C6, Decl(staticAsIdentifier.ts, 20, 1))

static
static
>static : Symbol(C6.static, Decl(staticAsIdentifier.ts, 22, 10))
}

class C7 extends C6 {
>C7 : Symbol(C7, Decl(staticAsIdentifier.ts, 25, 1))
>C6 : Symbol(C6, Decl(staticAsIdentifier.ts, 20, 1))

static override static
>static : Symbol(C7.static, Decl(staticAsIdentifier.ts, 27, 21))
}



27 changes: 27 additions & 0 deletions tests/baselines/reference/staticAsIdentifier.types
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,40 @@ class C3 {
>C3 : C3

static static p: string;
>static : any
>p : string
}

class C4 {
>C4 : C4

static static foo() {}
>static : any
>foo : () => void
}

class C5 {
>C5 : C5

static static
>static : any
}

class C6 {
>C6 : C6

static
static
>static : any
}

class C7 extends C6 {
>C7 : C7
>C6 : C6

static override static
>static : any
}



Loading

0 comments on commit de18a80

Please sign in to comment.