-
-
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
Breaking change or bug re: tuple unpacking? #23042
Comments
It was never supposed to compile. |
#22537, the old behavior is hard to justify, you can discard the unused parts of the tuple with let longTuple = foo()
let a = longTuple[0]
let b = longTuple[1] |
Agreed, and I didn't realize it "works" until investigating compile-time errors with Still, it works in every stable release from |
Description
The following compiles/runs in Nim
2.0.0
and earlier versionsWith the
devel
branch (installed viachoosenim devel --latest
) there is a compile-time errorIs there an upcoming breaking change re: unpacking or is this a bug?
Nim Version
Nim Compiler Version 2.1.1 [MacOSX: amd64]
Compiled at 2023-12-07
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: e1a0ff1
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
Unknown
Additional Information
Someone was asking in the community Discord about
nim-package-directory
failing to compile with Nim v2 —nim c package_directory.nim
per readme. There are some unrelated compile-time errors when2.0.0
is used but I came across this issue when trying it with currentdevel
.The problem relates to code in one of the dependencies of
nim-package-directory
: https://github.com/FedericoCeratto/nim-morelogging/blob/ea61e0e8f49db122cb12c263ba05313a29aeea81/morelogging.nim#L199The text was updated successfully, but these errors were encountered: