Skip to content

Commit 7205750

Browse files
committed
Test that declares conflicting method first
1 parent 8c01efb commit 7205750

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/cases/conformance/salsa/multipleDeclarations.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// @filename: input.js
22
// @out: output.js
33
// @allowJs: true
4-
54
function C() {
65
this.m = null;
76
}
87
C.prototype.m = function() {
98
this.nothing();
109
}
11-
1210
class X {
1311
constructor() {
1412
this.m = this.m.bind(this);
@@ -23,3 +21,17 @@ let x = new X();
2321
X.prototype.mistake = false;
2422
x.m();
2523
x.mistake;
24+
class Y {
25+
mistake() {
26+
}
27+
m() {
28+
}
29+
constructor() {
30+
this.m = this.m.bind(this);
31+
this.mistake = 'even more nonsense';
32+
}
33+
}
34+
Y.prototype.mistake = true;
35+
let y = new Y();
36+
y.m();
37+
y.mistake();

0 commit comments

Comments
 (0)