Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
index 720ed79084120164a6a5bff99955b66967bcdef7..afbab2f12293ecf3286cf09fbe8c8de4599587df 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -2490,11 +2490,6 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
exitLocalScope(); |
} |
FormalParameters formals = pop(); |
- List<TypeParameter> typeParameters = typeVariableBuildersToKernel(pop()); |
- FunctionNode function = formals.addToFunction(new FunctionNode(body, |
- typeParameters: typeParameters, asyncMarker: asyncModifier) |
- ..fileOffset = formals.charOffset |
- ..fileEndOffset = token.charOffset); |
exitLocalScope(); |
var declaration = pop(); |
var returnType = pop(); |
@@ -2502,6 +2497,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
returnType ??= const DynamicType(); |
pop(); // Modifiers. |
exitFunction(); |
+ List<TypeParameter> typeParameters = typeVariableBuildersToKernel(pop()); |
+ FunctionNode function = formals.addToFunction(new FunctionNode(body, |
+ typeParameters: typeParameters, asyncMarker: asyncModifier) |
+ ..fileOffset = formals.charOffset |
+ ..fileEndOffset = token.charOffset); |
if (declaration is FunctionDeclaration) { |
KernelFunctionDeclaration.setHasImplicitReturnType( |
declaration, hasImplicitReturnType); |