Skip to content

Commit fae279c

Browse files
Add test
1 parent c1f84f8 commit fae279c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/compiler/override-typeparam-mismatch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"asc_flags": [],
33
"stderr": [
44
"TS2515: Non-abstract class 'override-typeparam-mismatch/CC' does not implement inherited abstract member 'foo' from 'override-typeparam-mismatch/I'.",
5+
"TS2515: Non-abstract class 'override-typeparam-mismatch/DD' does not implement inherited abstract member 'bar' from 'override-typeparam-mismatch/J'.",
56
"EOF"
67
]
78
}

tests/compiler/override-typeparam-mismatch.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,17 @@ class CC implements I {
1111
let c:I = new CC();
1212
c.foo(1);
1313

14+
interface J {
15+
bar(x: i32): i32;
16+
}
17+
18+
class DD implements J {
19+
bar<T>(x: i32): i32 {
20+
return x;
21+
}
22+
}
23+
24+
let dd:DD = new DD();
25+
dd.bar<i32>(1);
26+
1427
ERROR("EOF");

0 commit comments

Comments
 (0)