| 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 796d5f1c28d2fc183f788c2f3f6d301ee9b2252a..dd85e0b109ce94f4687c1b3210255d64f2e9e1f0 100644
|
| --- a/compiler/java/com/google/dart/compiler/DartCompiler.java
|
| +++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
|
| @@ -499,8 +499,7 @@ public class DartCompiler {
|
| }
|
|
|
| // The library scope can then be constructed, containing types declared
|
| - // in the library, and // types declared in the imports. Loop can be
|
| - // parallelized.
|
| + // in the library, and types declared in the imports. Loop can be parallelized.
|
| for (LibraryUnit lib : libs) {
|
| new TopLevelElementBuilder().fillInLibraryScope(lib, context);
|
| }
|
| @@ -811,6 +810,11 @@ public class DartCompiler {
|
| } finally {
|
| Closeables.close(r, failed);
|
| }
|
| +
|
| + // auto-magically define "assert" function
|
| + if (dartSrc.getUri().toString().equals("dart://core/runtime/object.dart")) {
|
| + srcCode += "\nvoid assert(x) {}";
|
| + }
|
|
|
| DartScannerParserContext parserContext =
|
| new DartScannerParserContext(dartSrc, srcCode, context, context.getCompilerMetrics());
|
|
|