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

Unified Diff: runtime/vm/parser_test.cc

Issue 19662003: Refactor resolution code in the vm to properly handle ambiguity errors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « runtime/vm/parser.cc ('k') | runtime/vm/resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser_test.cc
===================================================================
--- runtime/vm/parser_test.cc (revision 25321)
+++ runtime/vm/parser_test.cc (working copy)
@@ -16,8 +16,9 @@
void DumpFunction(const Library& lib, const char* cname, const char* fname) {
const String& classname = String::Handle(Symbols::New(cname));
- Class& cls = Class::Handle(lib.LookupClass(classname));
- EXPECT(!cls.IsNull());
+ String& ambiguity_error_msg = String::Handle();
+ Class& cls = Class::Handle(lib.LookupClass(classname, &ambiguity_error_msg));
+ EXPECT(!cls.IsNull()); // No ambiguity error expected.
String& funcname = String::Handle(String::New(fname));
Function& function = Function::ZoneHandle(cls.LookupStaticFunction(funcname));
@@ -50,8 +51,9 @@
bool expect_static,
bool is_final) {
const String& classname = String::Handle(Symbols::New(class_name));
- Class& cls = Class::Handle(lib.LookupClass(classname));
- EXPECT(!cls.IsNull());
+ String& ambiguity_error_msg = String::Handle();
+ Class& cls = Class::Handle(lib.LookupClass(classname, &ambiguity_error_msg));
+ EXPECT(!cls.IsNull()); // No ambiguity error expected.
String& fieldname = String::Handle(String::New(field_name));
String& functionname = String::Handle();
@@ -85,8 +87,9 @@
const char* function_name,
bool expect_static) {
const String& classname = String::Handle(Symbols::New(class_name));
- Class& cls = Class::Handle(lib.LookupClass(classname));
- EXPECT(!cls.IsNull());
+ String& ambiguity_error_msg = String::Handle();
+ Class& cls = Class::Handle(lib.LookupClass(classname, &ambiguity_error_msg));
+ EXPECT(!cls.IsNull()); // No ambiguity error expected.
String& functionname = String::Handle(String::New(function_name));
Function& function = Function::Handle();
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698