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

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

Issue 9114053: Record names of constructors and use that to implement Object.toString. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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
Index: dart/frog/leg/lib/core.dart
diff --git a/dart/frog/leg/lib/core.dart b/dart/frog/leg/lib/core.dart
index 30a517b6174dcbb244ba5c8b5817862c489e20a4..b81ca3e9a9cad11363da04e96427ca357002b3f5 100644
--- a/dart/frog/leg/lib/core.dart
+++ b/dart/frog/leg/lib/core.dart
@@ -303,7 +303,9 @@ class int {}
class double {}
class String {}
class bool {}
-class Object {}
+class Object {
+ toString() => "[Instance of '${JS('String', @'this.constructor.name')}']";
Lasse Reichstein 2012/01/11 09:49:16 and @'this.constructor.$name' here.
+}
class List<T> {
static void _checkConstructorInput(n) {
// TODO(ngeoffray): Inline once we support optional parameters or

Powered by Google App Engine
This is Rietveld 408576698