[SILGen] Crashed when passing String-returning closure to ObjC #81986
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Uh oh!
There was an error while loading. Please reload this page.
Description
When an ObjC function asks a NSString-returning closure as an argument, swift can't pass that closure correctly, and SILGen will crash due to type mismatch: clang importer thinks the closure should return (swift)
String
, while SILGen type lowering lowers it to (swift)Optional<NSString>
Reproduction
I've put a minimal repro in a PR #81984
Just clone the project following the doc and build and run lit test on a Mac:
Stack dump
Expected behavior
Builds correctly
Environment
Additional information
No response
The text was updated successfully, but these errors were encountered: