Files
swift-mirror/validation-test/Evolution/Inputs/backward_deploy_struct.swift
Ben Cohen e9d4687e31 De-underscore @frozen, apply it to structs (#24185)
* De-underscore @frozen for enums

* Add @frozen for structs, deprecate @_fixed_layout for them

* Switch usage from _fixed_layout to frozen
2019-05-30 17:55:37 -07:00

46 lines
667 B
Swift

public func getVersion() -> Int {
#if BEFORE
return 0
#else
return 1
#endif
}
#if AFTER
@_weakLinked public struct ResilientStruct {
public init() {}
public func fn(_ x: Int) {}
public var storedProp: Int = 0
public var computedProp: Int {
get { return 0 }
set { }
}
public subscript(idx: Int) -> Int {
get { return 0 }
set { }
}
}
@_weakLinked @frozen public struct FixedLayoutStruct {
public init() {}
public func fn(_ x: Int) {}
public var storedProp: Int = 0
public var computedProp: Int {
get { return 0 }
set { }
}
public subscript(idx: Int) -> Int {
get { return 0 }
set { }
}
}
#endif