apple / swift-numerics

Advanced mathematical types and functions for Swift
Apache License 2.0
1.68k stars 147 forks source link

ComplexTests.DifferentiableTests/testZeroTangentVectorInitializer no longer compiles with Swift trunk #171

Closed finagolfin closed 3 years ago

finagolfin commented 3 years ago

I just built the Jan. 27 source snapshot of the Swift toolchain natively on my Android phone and then tried building and testing the latest commit on this repo's main branch, only to get this error:

swift-numerics/Tests/ComplexTests/DifferentiableTests.swift:74:42: error: value of type 'Complex<Float>' has no member 'zeroTangentVector'
    XCTAssertEqual(Complex<Float>(-5, 5).zeroTangentVector, Complex(0, 0))

I'm able to reproduce on Fedora Core 33 by using the official Centos 8 trunk snapshot builds from last month: Jan. 9 works but Jan. 23 doesn't, so this error isn't specific to Android.

I haven't dug into the reason, just reporting the regression.

stephentyrone commented 3 years ago

This is because zeroTangentVectorInitializer has been removed on Swift main. I think @compnerd is looking into a fix.

stephentyrone commented 3 years ago

Fixed in 0cf166da79de95fdc9395ad7c907d55bc7eb3a43.

finagolfin commented 3 years ago

Yep, I can run the tests now.