Skip to content

Commit fddd8bd

Browse files
Mark the concrete SIMD/Scalar comparisons disfavored (#82686)
Adding the concrete versions (#81892) introduced an ambiguity for concrete vec .<= .zero comparisons; previously the concrete SIMD .<= SIMD operation would win (because we didn't have a concrete overload for SIMD .<= SIMD.Scalar). We can restore the old behavior by marking these disfavored.
1 parent 71a3ca8 commit fddd8bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/SIMDFloatConcreteOperations.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ compares = [
122122
/// result[i] = (a[i] ${op} b)
123123
/// }
124124
/// ```
125-
@_alwaysEmitIntoClient @_transparent
125+
@_alwaysEmitIntoClient @_transparent @_disfavoredOverload
126126
public static func .${op}(a: Self, b: Scalar) -> SIMDMask<MaskStorage> {
127127
a .${op} Self(repeating: b)
128128
}
@@ -139,7 +139,7 @@ compares = [
139139
/// result[i] = (a ${op} b[i])
140140
/// }
141141
/// ```
142-
@_alwaysEmitIntoClient @_transparent
142+
@_alwaysEmitIntoClient @_transparent @_disfavoredOverload
143143
public static func .${op}(a: Scalar, b: Self) -> SIMDMask<MaskStorage> {
144144
Self(repeating: a) .${op} b
145145
}

0 commit comments

Comments
 (0)