| Index: pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| index d553e1666f50de4b98d1b128c8aeeb77d7483520..a24d94fcc0e7cb5a9d7c85285aec31c7fe229c9b 100644
|
| --- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| +++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| @@ -419,7 +419,14 @@ abstract class KernelToElementMapBase extends KernelToElementMapBaseMixin {
|
|
|
| @override
|
| FunctionType getFunctionType(ir.FunctionNode node) {
|
| - DartType returnType = getDartType(node.returnType);
|
| + DartType returnType;
|
| + if (node.parent is ir.Constructor) {
|
| + // The return type on generative constructors is `void`, but we need
|
| + // `dynamic` type to match the element model.
|
| + returnType = const DynamicType();
|
| + } else {
|
| + returnType = getDartType(node.returnType);
|
| + }
|
| List<DartType> parameterTypes = /*<DartType>*/ [];
|
| List<DartType> optionalParameterTypes = /*<DartType>*/ [];
|
| for (ir.VariableDeclaration variable in node.positionalParameters) {
|
|
|