mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
34 lines
449 B
Swift
34 lines
449 B
Swift
precedencegroup AssignmentPrecedence { assignment: true }
|
|
|
|
public enum Optional<T> {
|
|
case none
|
|
case some(T)
|
|
}
|
|
|
|
public struct B {
|
|
@_inlineable
|
|
public func amIConfused() {}
|
|
@_inlineable
|
|
public init() {}
|
|
}
|
|
|
|
public struct A {
|
|
public var b : B
|
|
|
|
@_inlineable
|
|
public init() {
|
|
b = B()
|
|
}
|
|
|
|
@_inlineable
|
|
public func isBConfused() {
|
|
b.amIConfused()
|
|
}
|
|
}
|
|
|
|
@_inlineable
|
|
public func doSomething() -> A {
|
|
var a = A()
|
|
return a
|
|
}
|