mirror of
https://github.com/apple/swift.git
synced 2026-06-27 12:25:55 +02:00
2584a4878e
This is technically a source break, but the @_fixed_layout attribute is not official yet. If anyone really cares, we can make this conditional on -swift-version 5 later, but I'd rather not. This change is necessary so that we can give property initializers non-public linkage. Currently they are public, because they can be referenced from inlinable initializers. Now that property initializers inside a @_fixed_layout type can only reference public symbols, they no longer have to be public, but making that change requires a bit more work.
16 lines
227 B
Swift
16 lines
227 B
Swift
@_fixed_layout
|
|
public struct X {
|
|
@_inlineable
|
|
public init() { }
|
|
}
|
|
|
|
@_inlineable
|
|
@inline(never)
|
|
public func the_thing<T>(t t : T) { }
|
|
|
|
@_inlineable
|
|
@inline(never)
|
|
public func the_thing_it_does(x x : X) {
|
|
the_thing(t: x)
|
|
}
|