Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index bc6740cd67e8c6f34b7b1142f08060463ce24a6e..112a37c6e2cf5b3a45383c46d570f5c1b69cc05f 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -3121,12 +3121,11 @@ void Parser::ParseConstructorRedirection(const Class& cls, |
Function::ZoneHandle(Z, cls.LookupConstructor(ctor_name)); |
if (redirect_ctor.IsNull()) { |
if (cls.LookupFactory(ctor_name) != Function::null()) { |
- ReportError( |
- call_pos, "redirection constructor '%s' must not be a factory", |
- String::Handle(Z, redirect_ctor.UserVisibleName()).ToCString()); |
+ ReportError(call_pos, |
+ "redirection constructor '%s' must not be a factory", |
+ ctor_name.ToCString()); |
hausner
2017/02/26 18:30:27
I think you want to use a user-visible name here,
Florian Schneider
2017/02/27 18:14:50
Good point. I'll change it to use ScrubName instea
|
} |
- ReportError(call_pos, "constructor '%s' not found", |
- String::Handle(Z, redirect_ctor.UserVisibleName()).ToCString()); |
+ ReportError(call_pos, "constructor '%s' not found", ctor_name.ToCString()); |
} |
if (current_function().is_const() && !redirect_ctor.is_const()) { |
ReportError(call_pos, "redirection constructor '%s' must be const", |