-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compliation error when formatting a complex number #24666
Comments
!nim c import std/[complex, strformat]
let z = complex64(1, 2)
discard fmt"{z}" |
🐧 Linux bisect by @metagn (collaborator)devel 👎 FAILOutput
Filesize stable 👎 FAILOutput
Filesize 2.0.10 👍 OKOutput
Filesize 2.0.0 👍 OKOutput
Filesize 1.6.20 👍 OKOutput
Filesize 1.4.8 👍 OKOutput
Filesize 1.2.18 👍 OKOutput
Filesize 1.0.10 👍 OKOutput
Filesize #52784f32b ➡️ 🐛Diagnosticsangel ezquerra introduced a bug at
The bug is in the files:
The bug can be in the commits: (Diagnostics sometimes off-by-one). Stats
🤖 Bug found in |
Description
The following code doesn’t compile:
The error occurs in procedure "formatValueAsComplexNumber". The procedure "contains" with expected signature is not available.
Nim Version
Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 78983f1
active boot switches: -d:release
Also encountered with development version.
Current Output
Expected Output
Known Workarounds
A workaround consists to add "strutils" to the list of imported modules.
This compiles without error:
Additional Information
In module "complex.nim" of the standard library, the procedure "contains" with the expected signature is not available. It can be found in "std/strutils". Importing "strutils" (or at least the procedure "contains") in "complex.nim" would solve the problem but would create a dependency.
The text was updated successfully, but these errors were encountered: