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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 10910142: Issue 4988. Fixe for 'assert' statement vs function resolving (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for artificial 'assert' function name Created 8 years, 3 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 | « no previous file | compiler/java/com/google/dart/compiler/resolver/Elements.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index c819db8f1598081ec5d835faddc888125df8c0de..30577f69bec0a31dc6afa3a86b9b9f56a5042deb 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -859,9 +859,9 @@ public class DartCompiler {
Closeables.close(r, failed);
}
- // auto-magically define "assert" function
+ // auto-magically define function to use instead of "assert" statement
if (dartSrc.getUri().toString().equals("dart://core/object.dart")) {
- srcCode += "\nvoid assert(x) {}";
+ srcCode += "\nvoid " + Elements.ASSERT_FUNCTION_NAME + "(x) {}";
}
// inject "Type" type from 1.0 M1 specification
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/Elements.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698