Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
index 6a2e36ad82d200cb4f4952c01268327022b4ade8..6d3de87bb788021113fc1f0acf0a82ba788f26a3 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
@@ -46,7 +46,8 @@ mixin(base, @rest mixins) => JS( |
// Run mixin initializers. They cannot have arguments. |
// Run them backwards so most-derived mixin is initialized first. |
for (let i = $mixins.length - 1; i >= 0; i--) { |
- $mixins[i].new.call(this); |
+ let m = $mixins[i]; |
+ (m[$mixinNew] || m.new).call(this); |
} |
// Run base initializer. |
$base[memberName].apply(this, args); |
@@ -109,6 +110,8 @@ final _typeArguments = JS('', 'Symbol("typeArguments")'); |
final _originalDeclaration = JS('', 'Symbol("originalDeclaration")'); |
+final mixinNew = JS('', 'Symbol("dart.mixinNew")'); |
+ |
/// Wrap a generic class builder function with future flattening. |
flattenFutures(builder) => JS( |
'', |