Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index ec9b3e60b6389bc2adcd07ecc956b756ae4ca27a..1f4ef85c34a434bc4aea646feecf601f804dbdb2 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -3181,24 +3181,23 @@ SequenceNode* Parser::ParseFunc(const Function& func, |
Function& generated_body_closure = Function::ZoneHandle(Z); |
if (func.IsAsyncFunction()) { |
ASSERT(!func.is_generated_body()); |
- // Must show frame for checked mode return type error. |
- ASSERT(func.is_debuggable()); |
+ // The code of an async function is synthesized. Disable debugging. |
+ func.set_is_debuggable(false); |
generated_body_closure = OpenAsyncFunction(func.token_pos()); |
} else if (func.IsAsyncClosure()) { |
// The closure containing the body of an async function is debuggable. |
ASSERT(func.is_debuggable()); |
OpenAsyncClosure(); |
} else if (func.IsSyncGenerator()) { |
- // Must show frame for checked mode return type error. |
- ASSERT(func.is_debuggable()); |
+ // The code of a sync generator is synthesized. Disable debugging. |
+ func.set_is_debuggable(false); |
generated_body_closure = OpenSyncGeneratorFunction(func.token_pos()); |
} else if (func.IsSyncGenClosure()) { |
// The closure containing the body of a sync generator is debuggable. |
ASSERT(func.is_debuggable()); |
async_temp_scope_ = current_block_->scope; |
} else if (func.IsAsyncGenerator()) { |
- // Must show frame for checked mode return type error. |
- ASSERT(func.is_debuggable()); |
+ func.set_is_debuggable(false); |
generated_body_closure = OpenAsyncGeneratorFunction(func.token_pos()); |
} else if (func.IsAsyncGenClosure()) { |
// The closure containing the body of an async* function is debuggable. |