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 29, 2021
1 parent 199451d commit 39644ca
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 9 deletions.
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
}



0 comments on commit 39644ca

Please sign in to comment.