Skip to content

Commit d9d0397

Browse files
Merge pull request #66219 from swiftwasm/pr-0a78621ff9f12f4599ec769c2d1c0bb3e4197f41
[DiscardingTG] Fix runtime signature mismatch for statically known `-> Void` closure
2 parents 3c585d5 + 0ceab44 commit d9d0397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
832832
// the async context to get at the parameters.
833833
// See e.g. FutureAsyncContextPrefix.
834834

835-
if (!futureResultType) {
835+
if (!futureResultType || taskCreateFlags.isDiscardingTask()) {
836836
auto asyncContextPrefix = reinterpret_cast<AsyncContextPrefix *>(
837837
reinterpret_cast<char *>(allocation) + headerSize -
838838
sizeof(AsyncContextPrefix));

0 commit comments

Comments
 (0)