Chromium Code Reviews| Index: runtime/vm/class_finalizer.cc |
| diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc |
| index ebf986896e5ad1901c0a4d3a5121d1756d1b3e71..c7cf184a9976dffb72798613e0eb0d6204a6d6c5 100644 |
| --- a/runtime/vm/class_finalizer.cc |
| +++ b/runtime/vm/class_finalizer.cc |
| @@ -2227,23 +2227,12 @@ void ClassFinalizer::ApplyMixinMembers(const Class& cls) { |
| const intptr_t num_functions = functions.Length(); |
| for (intptr_t i = 0; i < num_functions; i++) { |
| func ^= functions.At(i); |
| - if (func.IsFactory() || func.IsGenerativeConstructor()) { |
| + if (func.IsGenerativeConstructor()) { |
| // A mixin class must not have explicit constructors. |
| if (!func.IsImplicitConstructor()) { |
| - const char* ctr_kind = func.IsFactory() ? "factory" : "constructor"; |
|
Ivan Posva
2016/02/17 07:51:26
You need to preserve the improved error message be
Jacob
2016/02/19 20:53:03
Done.
|
| - const Script& script = Script::Handle(cls.script()); |
| - const Error& error = Error::Handle( |
| - LanguageError::NewFormatted(Error::Handle(), |
| - script, func.token_pos(), Report::AtLocation, |
| - Report::kError, Heap::kNew, |
| - "%s '%s' is illegal in mixin class %s", |
| - ctr_kind, |
| - String::Handle(func.PrettyName()).ToCString(), |
| - String::Handle(zone, mixin_cls.Name()).ToCString())); |
| - |
| - ReportErrors(error, cls, cls.token_pos(), |
| - "mixin class '%s' must not have constructors", |
| - String::Handle(zone, mixin_cls.Name()).ToCString()); |
| + ReportError(cls, cls.token_pos(), |
| + "mixin class '%s' must not have constructors\n", |
| + String::Handle(zone, mixin_cls.Name()).ToCString()); |
| } |
| continue; // Skip the implicit constructor. |
| } |