Open schlossmichael opened 1 year ago
@jckarter As far as I remember it not currently possible to use closures with _openExistential
, is that right? We really need a diagnostic for this...
The minimal reproducer is surprisingly small:
protocol P {}
func test(_ foo: any P) {
_openExistential(foo) { _ in }
}
Description
Trying to compile the following code results in the assertion failure
(!type->hasArchetype() && "Archetype in interface type"), function cacheResult, file TypeCheckRequests.cpp, line 1050
:Steps to reproduce
swiftc
against the macOS 13 SDK (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk
)Expected behavior
Code compiles and either finished successfully or outputs an error diagnostic
Environment
and
macOS 13.4