SILGen: Use lowered function type parameters in objc-to-swift thunks for initializers.

Fixes a regression caused by the `self` declaration being given a `DynamicSelfType`
even though the formal type of the enclosing function sometimes still uses the
concrete base class type.

Fixes #83876 | rdar://158956768.
This commit is contained in:
Joe Groff
2025-09-06 08:15:39 -07:00
parent 96900f9bd0
commit 4f1e895e56
3 changed files with 30 additions and 15 deletions

View File

@@ -0,0 +1,9 @@
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/protocol-static-reqt-objc-class-impl.h %s -verify
// REQUIRES: objc_interop
protocol P {
static func foo() -> Self
}
extension C: P {}