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

Unified Diff: frog/leg/lib/core.dart

Issue 9027002: Support factory methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
Index: frog/leg/lib/core.dart
===================================================================
--- frog/leg/lib/core.dart (revision 2741)
+++ frog/leg/lib/core.dart (working copy)
@@ -245,7 +245,11 @@
class String {}
class bool {}
class Object {}
-class List<T> {}
+class List<T> {
+ factory List(int n) {
+ return JS(@"new Array($0)", n);
kasperl 2011/12/22 11:34:42 Should we be checking that i is an int here (at le
ngeoffray 2011/12/22 13:07:02 Done.
+ }
+}
class Stopwatch {
double startMs;
« no previous file with comments | « frog/leg/emitter.dart ('k') | frog/leg/namer.dart » ('j') | frog/leg/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698