mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This commit changes the behaviour of the error for passing a temporary pointer conversion to an @_nonEphemeral parameter such that it doesn't affect overload resolution. This is done by recording the fix with an impact of zero, meaning that we don't touch the solution's score. In addition, this change means we no longer need to perform the ranking hack where we favour array-to-pointer, as the disjunction short-circuiting will continue to happen even with the fix recorded.
40 lines
778 B
Swift
40 lines
778 B
Swift
|
|
public struct ResilientStruct {
|
|
public static var staticStoredProperty: Int8 = 0
|
|
public var storedProperty: Int8 = 0
|
|
public init() {}
|
|
}
|
|
|
|
@frozen
|
|
public struct FragileStruct {
|
|
@_fixed_layout
|
|
public static var staticStoredProperty: Int8 = 0
|
|
public var storedProperty: Int8 = 0
|
|
public init() {}
|
|
}
|
|
|
|
public final class ResilientFinalClass {
|
|
public var storedProperty: Int8 = 0
|
|
public init() {}
|
|
}
|
|
|
|
@_fixed_layout
|
|
public final class FragileFinalClass {
|
|
public var storedProperty: Int8 = 0
|
|
public init() {}
|
|
}
|
|
|
|
public var globalResilient: Int8 = 0
|
|
|
|
@_fixed_layout
|
|
public var globalFragile: Int8 = 0
|
|
|
|
@_fixed_layout
|
|
public var overloadedVar = 0
|
|
|
|
@_fixed_layout
|
|
public var overloadedVarOnlyOneResilient = 0
|
|
|
|
@_fixed_layout
|
|
public var overloadedVarDifferentTypes = 0
|