Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index d3c0fd2b82ac09ce1b2ec329dac03770a3d2d39b..6e35f2bb3faab50a1be03b25d1b652ed71ef01cb 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -1317,6 +1317,9 @@ abstract class KernelMember implements Member { |
if (member._accessorNode != null) { |
member._accessorNode.overrides.add(overriddenMember); |
} |
+ if (member is KernelProcedure && member._methodNode != null) { |
+ member._methodNode.overrides.add(overriddenMember); |
+ } |
} |
} |
@@ -1475,10 +1478,15 @@ class KernelProcedure extends Procedure implements KernelMember { |
@override |
AccessorNode _accessorNode; |
+ MethodNode _methodNode; |
+ |
@override |
KernelTypeInferrer _typeInferrer; |
+ final bool _hasImplicitReturnType; |
+ |
KernelProcedure(Name name, ProcedureKind kind, FunctionNode function, |
+ this._hasImplicitReturnType, |
{String fileUri}) |
: super(name, kind, function, fileUri: fileUri); |
@@ -1501,6 +1509,15 @@ class KernelProcedure extends Procedure implements KernelMember { |
'setInferredType called on a procedure that is not an accessor'); |
} |
} |
+ |
+ static MethodNode getMethodNode(Procedure procedure) { |
+ if (procedure is KernelProcedure) return procedure._methodNode; |
+ return null; |
+ } |
+ |
+ static bool hasImplicitReturnType(KernelProcedure procedure) { |
+ return procedure._hasImplicitReturnType; |
+ } |
} |
/// Concrete shadow object representing an assignment to a property. |
@@ -1938,6 +1955,13 @@ class KernelTypeInferenceEngine extends TypeInferenceEngineImpl { |
this, uri.toString(), listener, false, thisType, null); |
} |
+ @override |
+ MethodNode createMethodNode(KernelProcedure procedure) { |
+ MethodNode methodNode = new MethodNode(procedure); |
+ procedure._methodNode = methodNode; |
+ return methodNode; |
+ } |
+ |
@override |
KernelTypeInferrer createTopLevelTypeInferrer(TypeInferenceListener listener, |
InterfaceType thisType, KernelMember member) { |