Skip to content

Commit 6cb7f5e

Browse files
committed
Add some case
1 parent 9371d87 commit 6cb7f5e

File tree

5 files changed

+61
-11
lines changed

5 files changed

+61
-11
lines changed

tests/baselines/reference/override1.errors.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
tests/cases/conformance/override/override1.ts(12,14): suggestion TS6385: 'not founded in base class' is deprecated
2-
tests/cases/conformance/override/override1.ts(18,14): suggestion TS6385: 'has override but not extended' is deprecated
1+
tests/cases/conformance/override/override1.ts(15,5): suggestion TS6385: 'need override' is deprecated
2+
tests/cases/conformance/override/override1.ts(19,14): suggestion TS6385: 'not founded in base class' is deprecated
3+
tests/cases/conformance/override/override1.ts(25,14): suggestion TS6385: 'has override but not extended' is deprecated
34

45

5-
==== tests/cases/conformance/override/override1.ts (2 errors) ====
6+
==== tests/cases/conformance/override/override1.ts (3 errors) ====
67
class B {
78
foo (v: string) {
89

10+
}
11+
fooo (v: string) {
12+
913
}
1014
}
1115

@@ -14,6 +18,12 @@ tests/cases/conformance/override/override1.ts(18,14): suggestion TS6385: 'has ov
1418

1519
}
1620

21+
fooo (v: string) {
22+
~~~~
23+
!!! suggestion TS6385: 'need override' is deprecated
24+
25+
}
26+
1727
override bar(v: string) {
1828
~~~
1929
!!! suggestion TS6385: 'not founded in base class' is deprecated

tests/baselines/reference/override1.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
class B {
33
foo (v: string) {
44

5+
}
6+
fooo (v: string) {
7+
58
}
69
}
710

@@ -10,6 +13,10 @@ class D extends B {
1013

1114
}
1215

16+
fooo (v: string) {
17+
18+
}
19+
1320
override bar(v: string) {
1421

1522
}
@@ -40,6 +47,8 @@ var B = /** @class */ (function () {
4047
}
4148
B.prototype.foo = function (v) {
4249
};
50+
B.prototype.fooo = function (v) {
51+
};
4352
return B;
4453
}());
4554
var D = /** @class */ (function (_super) {
@@ -49,6 +58,8 @@ var D = /** @class */ (function (_super) {
4958
}
5059
D.prototype.foo = function (v) {
5160
};
61+
D.prototype.fooo = function (v) {
62+
};
5263
D.prototype.bar = function (v) {
5364
};
5465
return D;

tests/baselines/reference/override1.symbols

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,43 @@ class B {
66
>foo : Symbol(B.foo, Decl(override1.ts, 0, 9))
77
>v : Symbol(v, Decl(override1.ts, 1, 9))
88

9+
}
10+
fooo (v: string) {
11+
>fooo : Symbol(B.fooo, Decl(override1.ts, 3, 5))
12+
>v : Symbol(v, Decl(override1.ts, 4, 10))
13+
914
}
1015
}
1116

1217
class D extends B {
13-
>D : Symbol(D, Decl(override1.ts, 4, 1))
18+
>D : Symbol(D, Decl(override1.ts, 7, 1))
1419
>B : Symbol(B, Decl(override1.ts, 0, 0))
1520

1621
override foo (v: string) {
17-
>foo : Symbol(D.foo, Decl(override1.ts, 6, 19))
18-
>v : Symbol(v, Decl(override1.ts, 7, 18))
22+
>foo : Symbol(D.foo, Decl(override1.ts, 9, 19))
23+
>v : Symbol(v, Decl(override1.ts, 10, 18))
1924

2025
}
2126

27+
fooo (v: string) {
28+
>fooo : Symbol(D.fooo, Decl(override1.ts, 12, 5))
29+
>v : Symbol(v, Decl(override1.ts, 14, 10))
30+
31+
}
32+
2233
override bar(v: string) {
23-
>bar : Symbol(D.bar, Decl(override1.ts, 9, 5))
24-
>v : Symbol(v, Decl(override1.ts, 11, 17))
34+
>bar : Symbol(D.bar, Decl(override1.ts, 16, 5))
35+
>v : Symbol(v, Decl(override1.ts, 18, 17))
2536

2637
}
2738
}
2839

2940
class C {
30-
>C : Symbol(C, Decl(override1.ts, 14, 1))
41+
>C : Symbol(C, Decl(override1.ts, 21, 1))
3142

3243
override foo(v: string) {
33-
>foo : Symbol(C.foo, Decl(override1.ts, 16, 9))
34-
>v : Symbol(v, Decl(override1.ts, 17, 17))
44+
>foo : Symbol(C.foo, Decl(override1.ts, 23, 9))
45+
>v : Symbol(v, Decl(override1.ts, 24, 17))
3546

3647
}
3748
}

tests/baselines/reference/override1.types

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ class B {
44

55
foo (v: string) {
66
>foo : (v: string) => void
7+
>v : string
8+
9+
}
10+
fooo (v: string) {
11+
>fooo : (v: string) => void
712
>v : string
813

914
}
@@ -19,6 +24,12 @@ class D extends B {
1924

2025
}
2126

27+
fooo (v: string) {
28+
>fooo : (v: string) => void
29+
>v : string
30+
31+
}
32+
2233
override bar(v: string) {
2334
>bar : (v: string) => void
2435
>v : string

tests/cases/conformance/override/override1.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
class B {
22
foo (v: string) {
33

4+
}
5+
fooo (v: string) {
6+
47
}
58
}
69

@@ -9,6 +12,10 @@ class D extends B {
912

1013
}
1114

15+
fooo (v: string) {
16+
17+
}
18+
1219
override bar(v: string) {
1320

1421
}

0 commit comments

Comments
 (0)