Skip to content
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

Format error while adding :g flag #9023

Closed
vivekimsit opened this issue Sep 20, 2018 · 3 comments
Closed

Format error while adding :g flag #9023

vivekimsit opened this issue Sep 20, 2018 · 3 comments

Comments

@vivekimsit
Copy link

I need to import strformat in unit tests otherwise I get the following error:

unit.nim(3, 7) template/generic instantiation from here
unit.nim(4, 8) template/generic instantiation from here
unit.nim(5, 11) template/generic instantiation from here
lib/pure/unittest.nim(610, 43) template/generic instantiation from here
/Users/vivekpoddar/dev/pretty-bytes/src/prettybytes.nim(17, 13) template/generic instantiation from here
lib/pure/strformat.nim(276, 5) Error: undeclared identifier: 'format'
       Tip: 4 messages have been suppressed, use --verbose to show them.
     Error: Execution failed with exit code 256
@mratsim
Copy link
Collaborator

mratsim commented Sep 20, 2018

Can you post a minimal example for reproduction.

Those will get included to the test suite when the bug is fixed.

Looking at https://github.com/vivekimsit/pretty-bytes/blob/99ff60947b8ddc990b27f016df4b70e44be0bd27/src/prettybytes.nim, I would guess it's another case of macro + generics (#8677), and maybe a duplicate of #7632.

@vivekimsit
Copy link
Author

Yes, I need to add the import here to make the code compile.

@mratsim
Copy link
Collaborator

mratsim commented May 9, 2019

Tested and it works since 0.19.0 (but not in 0.18.0). Pretty sure it was duplicate of #7632.

@mratsim mratsim closed this as completed May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants