apple / swift-numerics

Advanced mathematical types and functions for Swift
Apache License 2.0
1.67k stars 142 forks source link

Add missing import required to use a conformance #233

Closed xymus closed 2 years ago

xymus commented 2 years ago

A new compiler check (https://github.com/apple/swift/pull/60008) reports a missing import for a conformance used in API. The compiler was only seeing the conformance because it was imported implicitly, via a different local file or module.

Sources/_TestSupport/Error.swift:21:13: error: cannot use conformance of 'Float' to 'Real' here; 'RealModule' was not imported by this file
public func componentwiseError(_ tst: Complex<Float>, _ ref: Complex<Double>) -> Double {

Address this issue in the project by adding the missing import.

xymus commented 2 years ago

@swift-ci test

xymus commented 2 years ago

@swift-ci test

xymus commented 2 years ago

@stephentyrone Could I get a review please? We need this fix in to reenable swift-numerics in the source compatibility suite.