Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: test/cctest/test-parsing.cc

Issue 1853763002: Allow constructor and method signatures in classes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-1849803002-intf-decl
Patch Set: Fix method type annotations in the preparser Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/preparser.cc ('k') | test/mjsunit/harmony/typesystem/class-declarations.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 79690f209e367406eddc37914252e05a386892e2..bfbd08c6b137a4e7b16dd62eb571a42f148ea452 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7882,6 +7882,8 @@ TEST(TypedModeClassDeclarations) {
"class C { [x: number]; }",
"class C { [x: string] : boolean; }",
"class C { [x: number] : boolean; }",
+ "class C { constructor (x: number); constructor (x) {} }",
rossberg 2016/04/18 11:13:10 Also try in the opposite order.
nickie 2016/04/18 12:35:09 It is not 100% clear if that should be valid or no
+ "class C { f (x: number) : number; f (x) { return x; } }",
rossberg 2016/04/18 11:13:10 Same here.
NULL
};
@@ -7897,6 +7899,7 @@ TEST(TypedModeClassDeclarations) {
"class C { [x: any]; }",
"class C { [x: any] : any; }",
"class C { static [x: number]; }",
+ "class C { constructor (x: number) : number; constructor (x) {} }",
NULL
};
« no previous file with comments | « src/parsing/preparser.cc ('k') | test/mjsunit/harmony/typesystem/class-declarations.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698