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

Unified Diff: dart/lib/compiler/implementation/lib/core.dart

Issue 10823184: Basic type inference skeleton (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 4 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/lib/compiler/implementation/lib/core.dart
diff --git a/dart/lib/compiler/implementation/lib/core.dart b/dart/lib/compiler/implementation/lib/core.dart
index 1a3e497b0f4cc02ee69c41adb04779ab3fc2dace..e8bcff8bfc2d17aa0b1f9191017e88342f28f982 100644
--- a/dart/lib/compiler/implementation/lib/core.dart
+++ b/dart/lib/compiler/implementation/lib/core.dart
@@ -39,7 +39,13 @@
#source('mock.dart');
#source('clock.dart');
-void print(var obj) => Primitives.printString(obj.toString());
+void print(var obj) {
ngeoffray 2012/08/16 12:53:10 Why this change?
ahe 2012/08/16 17:26:54 For hello world, I can infer that this method is o
+ if (obj is String) {
+ Primitives.printString(obj);
+ } else {
+ Primitives.printString(obj.toString());
+ }
+}
class Object {
String toString() => Primitives.objectToString(this);

Powered by Google App Engine
This is Rietveld 408576698