Skip to content

Commit 72f30a8

Browse files
committed
Add test for quoted constructors
1 parent b010010 commit 72f30a8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class C {
2+
x: number;
3+
"constructor"() {
4+
this.x = 0;
5+
}
6+
}
7+
(new C).constructor(); // Error
8+
9+
class D {
10+
x: number;
11+
'constructor'() {
12+
this.x = 0;
13+
}
14+
}
15+
(new C).constructor(); // Error
16+
17+
class E {
18+
x: number;
19+
['constructor']() {
20+
this.x = 0;
21+
}
22+
}
23+
(new E).constructor();

0 commit comments

Comments
 (0)