Strange observation:
// import func Foundation.sqrt
let x = 2.0
// print(sqrt(x))
print(x.squareRoot())
This yields:
0/1] Planning build
Building for debugging...
[0/4] Write swift-version--53D108475B68636.txt
[2/5] Emitting module actorism
error: link command failed with exit code 1 (use -v to see invocation)
/home/karl/swift/swift-6.0.3-RELEASE-ubuntu22.04/usr/lib/swift/shims/LibcShims.h:155: error: undefined reference to 'sqrt'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[3/4] Linking actorism
But this compiles and prints the result twice:
import func Foundation.sqrt
let x = 2.0
print(sqrt(x))
print(x.squareRoot())
Thanks for any hint.