What happened to squareRoot()?

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.

What build settings are you using? I'm not seeing the same behavior in the REPL or SwiftFiddle.

You mean what swift build -v shows?

BTW:

swift repl
Welcome to Swift version 6.0.3 (swift-6.0.3-RELEASE).
Type :help for assistance.
  1> 2.squareRoot()
$R0: Double = 1.4142135623730951
  2>