| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 0f3a7f40b7915fd87bf70e6a795285195e3a55a0..4ceca8153a0812788936ba009b93e091d9a549f5 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -1600,7 +1600,10 @@ const char* Class::ApplyPatch(const Class& patch) const {
|
| // Non-patched function is preserved, all patched functions are added in
|
| // the loop below.
|
| new_functions.Add(orig_func);
|
| - } else if (!func.HasCompatibleParametersWith(orig_func)) {
|
| + } else if (!func.HasCompatibleParametersWith(orig_func) &&
|
| + !(func.IsFactory() && orig_func.IsConstructor() &&
|
| + (func.num_fixed_parameters() + 1 ==
|
| + orig_func.num_fixed_parameters()))) {
|
| return FormatPatchError("mismatched parameters: %s", member_name);
|
| }
|
| }
|
|
|