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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1699233002: Revert "Compile-time error if mixin class has a fact (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | tests/language/language_analyzer2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index f2c7b12c60438f26ff4deb02f15007448172df37..9c0c88f94e5108641aeda90467442d147187fa2e 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -2252,17 +2252,15 @@ 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";
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,
+ "constructor '%s' is illegal in mixin class %s",
String::Handle(func.PrettyName()).ToCString(),
String::Handle(zone, mixin_cls.Name()).ToCString()));
« no previous file with comments | « no previous file | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698