Add test for quoted constructors

This commit is contained in:
Andrew Branch
2019-04-25 11:35:10 -07:00
parent b0100100a1
commit 72f30a8308

View File

@@ -0,0 +1,23 @@
class C {
x: number;
"constructor"() {
this.x = 0;
}
}
(new C).constructor(); // Error
class D {
x: number;
'constructor'() {
this.x = 0;
}
}
(new C).constructor(); // Error
class E {
x: number;
['constructor']() {
this.x = 0;
}
}
(new E).constructor();