mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
My recent capture analysis refactoring broke a subtle corner case that wasn't exercised by the test suite. If a local inside g() was skipped, but the outer function was not skipped, we would return the empty list of captures for g(). But if the interface type of g() actually involves an outer generic parameter type, then the empty capture list did not record the fact that a generic signature was needed, so we attempted to form a call to the local function without a generic signature.
17 lines
342 B
Swift
17 lines
342 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types %s -emit-module-path %t/skip_local_function_bodies.swiftmodule
|
|
|
|
public protocol P {
|
|
init()
|
|
}
|
|
|
|
extension P {
|
|
public func f() {
|
|
typealias T = Self
|
|
|
|
func g(_ x: T) {}
|
|
g(self)
|
|
}
|
|
}
|
|
|