mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The check for implementationOnly imports was already done for types, but it was missing for functions. Fixes a crash when implementationOnly-importing a C module. https://bugs.swift.org/browse/SR-15048 rdar://81701218
18 lines
313 B
Swift
18 lines
313 B
Swift
import Foundation
|
|
|
|
final class ObjcClass : NSObject {
|
|
fileprivate var ii: Int = 127
|
|
}
|
|
|
|
@inline(never)
|
|
func returnObjcClassMember<T>(_ c: ObjcClass, _ t: T) -> Int {
|
|
return c.ii
|
|
}
|
|
|
|
@inline(never)
|
|
public func callObjcClassMember<T>(_ t: T) -> Int {
|
|
let c = ObjcClass()
|
|
return returnObjcClassMember(c, t)
|
|
}
|
|
|