Chromium Code Reviews| Index: pkg/kernel/lib/ast.dart |
| diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart |
| index 8f05d4d8d178906ac103dc2aff8179f3c87936ab..df9826f5bf9c2a6c978d80d0fb9dbbaa08e822af 100644 |
| --- a/pkg/kernel/lib/ast.dart |
| +++ b/pkg/kernel/lib/ast.dart |
| @@ -1257,7 +1257,7 @@ class FunctionNode extends TreeNode { |
| this.returnType: const DynamicType(), |
| this.inferredReturnValue, |
| this.asyncMarker: AsyncMarker.Sync, |
| - this.dartAsyncMarker: AsyncMarker.Sync}) |
| + this.dartAsyncMarker}) |
| : this.positionalParameters = |
| positionalParameters ?? <VariableDeclaration>[], |
| this.requiredParameterCount = |
| @@ -1269,6 +1269,9 @@ class FunctionNode extends TreeNode { |
| setParents(this.positionalParameters, this); |
| setParents(this.namedParameters, this); |
| body?.parent = this; |
| + if (dartAsyncMarker == null) { |
|
Kevin Millikin (Google)
2017/03/02 10:10:26
dartAsyncMarker ??= asyncMarker;
|
| + dartAsyncMarker = asyncMarker; |
| + } |
| } |
| static DartType _getTypeOfVariable(VariableDeclaration node) => node.type; |