[dart2wasm] Fix sync* iterable element types
Fixes tests: - co19/Language/Functions/element_type_A01_t03 - co19/Language/Functions/element_type_A01_t04 - co19/Language/Functions/element_type_A01_t06 Fixes #54413. Same change for `async*` functions was made in https://dart-review.googlesource.com/c/sdk/+/342561. Change-Id: Ib9e23b3fff9e2f1b952b5ba114ec70d5a8aea372 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343141 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
This commit is contained in:
committed by
Commit Queue
parent
64584c128a
commit
4d3895a7b3
@@ -264,11 +264,7 @@ class SyncStarCodeGenerator extends CodeGenerator {
|
||||
FunctionNode functionNode, Context? context, w.BaseFunction resumeFun) {
|
||||
// Instantiate a [_SyncStarIterable] containing the context and resume
|
||||
// function for this `sync*` function.
|
||||
DartType returnType = functionNode.returnType;
|
||||
DartType elementType = returnType is InterfaceType &&
|
||||
returnType.classNode == translator.coreTypes.iterableClass
|
||||
? returnType.typeArguments.single
|
||||
: DynamicType();
|
||||
DartType elementType = functionNode.emittedValueType!;
|
||||
translator.functions.allocateClass(syncStarIterableInfo.classId);
|
||||
b.i32_const(syncStarIterableInfo.classId);
|
||||
b.i32_const(initialIdentityHash);
|
||||
|
||||
Reference in New Issue
Block a user