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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 11817013: Do not apply optimizations based on an element if that element cannot be resolved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | tests/compiler/dart2js/type_inference_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
===================================================================
--- tests/compiler/dart2js/mock_compiler.dart (revision 16853)
+++ tests/compiler/dart2js/mock_compiler.dart (working copy)
@@ -52,9 +52,11 @@
class JSArray {
var length;
operator[](index) {}
+ var add;
}
class JSString {
var length;
+ operator[](index) {}
}
class JSNumber {
}
@@ -233,6 +235,13 @@
if (sourceFile == null) throw new ArgumentError(uri);
return new Script(uri, sourceFile);
}
+
+ Element lookupElementIn(ScopeContainerElement container, SourceString name) {
+ Element element = container.localLookup(name);
+ return element != null
+ ? element
+ : new ErroneousElement(null, null, name, container);
+ }
}
void compareWarningKinds(String text, expectedWarnings, foundWarnings) {
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | tests/compiler/dart2js/type_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698