-
-
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
Some issues after importing tables module (with iterators?) #8064
Comments
import tables
let t = {"a": 1, "b":2}.newTable
for x in values(t):
echo x I agree that the error messages you got were not very informative |
@andreaferretti |
I agree - the errors should be handled and reporting should be improved. That's why I added the |
Example 4 gives proper(?) error messages on devel. Reduced code for example 3: type
A = object
B = object
proc values[T](o: A, x: T): T = x
proc values[T](o: B, x: T): T = x
values[1] |
I think only example 1 should take care of for current stage. like |
Sorry, my nim skills are too low to narrow the issues anymore. The only thing I know is that
values
in the below snippets is some iterator from tables module. And since i don't even know what the reason of the crash is, I cannot even search github for existing issues.1
Code:
gives
2. Adding discard to the above code gives -
In the first snippet the compiler asks to discard value but now it says that nothing can be discarded.
3. This code crashes compiler
crashes compiler with -
Koch gives -
4. This code also crashes compiler
Koch gives
The text was updated successfully, but these errors were encountered: