swift
29e5549e - [6.2][cxx-interop] Prevent crash when importing a std::optional of nonescapable

Commit
62 days ago
[6.2][cxx-interop] Prevent crash when importing a std::optional of nonescapable When we tried to create a std::optional of a nonescapable type in Swift, the compiler would run into an assertion failure. This is because std::optional has an anonymous union where one of its members would be of this nonescapable type. Turns out that we were not handling anonymous unions with nonescapable members correctly. Fields of anonymous unions are injected to the parent as IndirectFieldDecl, so we need to handle these indirect fields the same way we handle "normal" fields. rdar://156704699
Author
Committer
Parents
Loading