Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1176)

Unified Diff: pkg/kernel/lib/transformations/continuation.dart

Issue 2938573002: Improve recovery from compile-time errors. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/core_types.dart ('k') | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/continuation.dart
diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
index 5090511ca6230dfd3283dffaef23ce05b0a911e1..632731756d68c6aaebf3d8dd38724047df8416e9 100644
--- a/pkg/kernel/lib/transformations/continuation.dart
+++ b/pkg/kernel/lib/transformations/continuation.dart
@@ -44,6 +44,10 @@ class RecursiveContinuationRewriter extends Transformer {
return node.accept(this);
}
+ visitProcedure(Procedure node) {
+ return node.isAbstract ? node : super.visitProcedure(node);
+ }
+
visitFunctionNode(FunctionNode node) {
switch (node.asyncMarker) {
case AsyncMarker.Sync:
@@ -824,7 +828,7 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
completerVariable = new VariableDeclaration(":completer",
initializer: new StaticInvocation(helper.completerConstructor,
new Arguments([], types: completerTypeArguments))
- ..fileOffset = enclosingFunction.body.fileOffset,
+ ..fileOffset = enclosingFunction.body?.fileOffset ?? -1,
isFinal: true,
type: completerType);
statements.add(completerVariable);
« no previous file with comments | « pkg/kernel/lib/core_types.dart ('k') | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698