Unclear error message when importing #4541

Closed
kierdavis opened this Issue Jul 30, 2016 · 0 comments

Projects

None yet

1 participant

@kierdavis
Contributor

The code:

import a/types
import b/types

correctly fails to compile, since both import statements declare an identifier named types. However, the file/line info displayed with the error message from the compiler currently says the error occurred on line 1 of b/types.nim, which may be misleading - the actual error is in completely different file to where the compiler says the error is.

@kierdavis kierdavis added a commit to kierdavis/Nim that referenced this issue Jul 30, 2016
@kierdavis kierdavis Locate 'attempt to redefine' errors at the import statement rather th…
…an at the first line of the imported module. Fixes #4541.
9a2a433
@Araq Araq pushed a commit that closed this issue Jul 30, 2016
@kierdavis kierdavis Locate 'attempt to redefine' errors at the import statement rather th…
…an at the first line of the imported module. Fixes #4541.
2bea2bd
@Araq Araq closed this in 2bea2bd Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment