Skip to content

Commit

Permalink
Add test for quoted constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Apr 25, 2019
1 parent b010010 commit 72f30a8
Showing 1 changed file with 23 additions and 0 deletions.
@@ -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();

0 comments on commit 72f30a8

Please sign in to comment.