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

Unified Diff: runtime/vm/parser.cc

Issue 12211045: Allow ambiguous Expect and ExpectException imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added TODO. Created 7 years, 10 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: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 34dee42f0d9bc5d7144d765429f6a5a71f5cb2df..48c31c4f07690c1fb7dce09d248856e8571c000e 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -8223,7 +8223,10 @@ RawObject* Parser::ResolveNameInCurrentLibraryScope(intptr_t ident_pos,
imported_obj = LookupNameInImport(import, name);
if (!imported_obj.IsNull()) {
const Library& lib = Library::Handle(import.library());
- if (!first_lib_url.IsNull()) {
+ // TODO(8474): Remove the "Expect" special casing.
+ if (!first_lib_url.IsNull()
+ && (strcmp(name.ToCString(), "Expect") != 0)
+ && (strcmp(name.ToCString(), "ExpectException") != 0)) {
// Found duplicate definition.
Error& ambiguous_ref_error = Error::Handle();
if (first_lib_url.raw() == lib.url()) {

Powered by Google App Engine
This is Rietveld 408576698