mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This entry point doesn't exist on older runtimes. Sema enforces that constrained existentials don't appear in substitution maps, however IRGen would sometimes try to instantiate metadata even if the user didn't do that. Fixes #64657.
23 lines
460 B
Swift
23 lines
460 B
Swift
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
|
|
// RUN: %target-swift-frontend -emit-ir -O %s | %FileCheck %s
|
|
|
|
protocol Foo<T> {
|
|
associatedtype T
|
|
func acceptEvent<T>(event: T)
|
|
}
|
|
|
|
protocol FooFactory<T> {
|
|
associatedtype T
|
|
func makeFoo() -> any Foo<T>
|
|
}
|
|
|
|
class Bar<T> {
|
|
private var foo: (any Foo<T>)
|
|
|
|
init(fooFactory: any FooFactory<T>) {
|
|
self.foo = fooFactory.makeFoo()
|
|
}
|
|
}
|
|
|
|
// CHECK-NOT: swift_getExtendedExistentialTypeMetadata
|