Skip to content

Commit 39644ca

Browse files
committed
Add the baselines
1 parent 199451d commit 39644ca

File tree

4 files changed

+125
-9
lines changed

4 files changed

+125
-9
lines changed

tests/baselines/reference/staticAsIdentifier.errors.txt

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tests/cases/compiler/staticAsIdentifier.ts(12,12): error TS1030: 'static' modifier already seen.
2-
tests/cases/compiler/staticAsIdentifier.ts(16,12): error TS1030: 'static' modifier already seen.
1+
tests/cases/compiler/staticAsIdentifier.ts(12,19): error TS1005: ';' expected.
2+
tests/cases/compiler/staticAsIdentifier.ts(16,19): error TS1005: ';' expected.
33

44

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

1616
class C3 {
1717
static static p: string;
18-
~~~~~~
19-
!!! error TS1030: 'static' modifier already seen.
18+
~
19+
!!! error TS1005: ';' expected.
2020
}
2121

2222
class C4 {
2323
static static foo() {}
24-
~~~~~~
25-
!!! error TS1030: 'static' modifier already seen.
24+
~~~
25+
!!! error TS1005: ';' expected.
2626
}
27+
28+
class C5 {
29+
static static
30+
}
31+
32+
class C6 {
33+
static
34+
static
35+
}
36+
37+
class C7 extends C6 {
38+
static override static
39+
}
40+
41+
2742

tests/baselines/reference/staticAsIdentifier.js

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,39 @@ class C3 {
1616
class C4 {
1717
static static foo() {}
1818
}
19+
20+
class C5 {
21+
static static
22+
}
23+
24+
class C6 {
25+
static
26+
static
27+
}
28+
29+
class C7 extends C6 {
30+
static override static
31+
}
32+
33+
1934

2035

2136
//// [staticAsIdentifier.js]
37+
var __extends = (this && this.__extends) || (function () {
38+
var extendStatics = function (d, b) {
39+
extendStatics = Object.setPrototypeOf ||
40+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
42+
return extendStatics(d, b);
43+
};
44+
return function (d, b) {
45+
if (typeof b !== "function" && b !== null)
46+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
47+
extendStatics(d, b);
48+
function __() { this.constructor = d; }
49+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
50+
};
51+
})();
2252
var C1 = /** @class */ (function () {
2353
function C1() {
2454
}
@@ -38,6 +68,23 @@ var C3 = /** @class */ (function () {
3868
var C4 = /** @class */ (function () {
3969
function C4() {
4070
}
41-
C4.foo = function () { };
71+
C4.prototype.foo = function () { };
4272
return C4;
4373
}());
74+
var C5 = /** @class */ (function () {
75+
function C5() {
76+
}
77+
return C5;
78+
}());
79+
var C6 = /** @class */ (function () {
80+
function C6() {
81+
}
82+
return C6;
83+
}());
84+
var C7 = /** @class */ (function (_super) {
85+
__extends(C7, _super);
86+
function C7() {
87+
return _super !== null && _super.apply(this, arguments) || this;
88+
}
89+
return C7;
90+
}(C6));

tests/baselines/reference/staticAsIdentifier.symbols

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,40 @@ class C3 {
2323
>C3 : Symbol(C3, Decl(staticAsIdentifier.ts, 8, 1))
2424

2525
static static p: string;
26-
>p : Symbol(C3.p, Decl(staticAsIdentifier.ts, 10, 10))
26+
>static : Symbol(C3.static, Decl(staticAsIdentifier.ts, 10, 10))
27+
>p : Symbol(C3.p, Decl(staticAsIdentifier.ts, 11, 17))
2728
}
2829

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

3233
static static foo() {}
33-
>foo : Symbol(C4.foo, Decl(staticAsIdentifier.ts, 14, 10))
34+
>static : Symbol(C4.static, Decl(staticAsIdentifier.ts, 14, 10))
35+
>foo : Symbol(C4.foo, Decl(staticAsIdentifier.ts, 15, 17))
3436
}
3537

38+
class C5 {
39+
>C5 : Symbol(C5, Decl(staticAsIdentifier.ts, 16, 1))
40+
41+
static static
42+
>static : Symbol(C5.static, Decl(staticAsIdentifier.ts, 18, 10))
43+
}
44+
45+
class C6 {
46+
>C6 : Symbol(C6, Decl(staticAsIdentifier.ts, 20, 1))
47+
48+
static
49+
static
50+
>static : Symbol(C6.static, Decl(staticAsIdentifier.ts, 22, 10))
51+
}
52+
53+
class C7 extends C6 {
54+
>C7 : Symbol(C7, Decl(staticAsIdentifier.ts, 25, 1))
55+
>C6 : Symbol(C6, Decl(staticAsIdentifier.ts, 20, 1))
56+
57+
static override static
58+
>static : Symbol(C7.static, Decl(staticAsIdentifier.ts, 27, 21))
59+
}
60+
61+
62+

tests/baselines/reference/staticAsIdentifier.types

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,40 @@ class C3 {
2323
>C3 : C3
2424

2525
static static p: string;
26+
>static : any
2627
>p : string
2728
}
2829

2930
class C4 {
3031
>C4 : C4
3132

3233
static static foo() {}
34+
>static : any
3335
>foo : () => void
3436
}
3537

38+
class C5 {
39+
>C5 : C5
40+
41+
static static
42+
>static : any
43+
}
44+
45+
class C6 {
46+
>C6 : C6
47+
48+
static
49+
static
50+
>static : any
51+
}
52+
53+
class C7 extends C6 {
54+
>C7 : C7
55+
>C6 : C6
56+
57+
static override static
58+
>static : any
59+
}
60+
61+
62+

0 commit comments

Comments
 (0)