mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The introduction of += and -= default implementations on AdditiveArithmetic introduces an ambiguity with the += and -= implementations on SIMD (where Scalar: FloatingPoint). Break the ambiguity by adding another set of definitions of += and -= on AdditiveArithmetic & SIMD where Self.Scalar: FloatingPoint. Fixes rdar://problem/55278156.
6 lines
311 B
Swift
6 lines
311 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
extension SIMD2: AdditiveArithmetic where Scalar: FloatingPoint { }
|
|
extension SIMD3: AdditiveArithmetic where Scalar: FloatingPoint { }
|
|
extension SIMD4: AdditiveArithmetic where Scalar: FloatingPoint { }
|
|
extension SIMD8: AdditiveArithmetic where Scalar: FloatingPoint { }
|