Skip to content

Commit 31c0ab7

Browse files
committed
Fix an assertion to also consider typed throws
1 parent 6bc3087 commit 31c0ab7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/MetadataRequest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ static MetadataResponse emitFunctionTypeMetadataRef(IRGenFunction &IGF,
16411641

16421642
default:
16431643
assert((!params.empty() || type->isDifferentiable() ||
1644-
type->getGlobalActor()) &&
1644+
type->getGlobalActor() || type->getThrownError()) &&
16451645
"0 parameter case should be specialized unless it is a "
16461646
"differentiable function or has a global actor");
16471647

0 commit comments

Comments
 (0)