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

Ambiguous error when import modules with same names but different aliases #22208

Closed
gabbhack opened this issue Jul 2, 2023 · 3 comments · Fixed by #22211
Closed

Ambiguous error when import modules with same names but different aliases #22208

gabbhack opened this issue Jul 2, 2023 · 3 comments · Fixed by #22211

Comments

@gabbhack
Copy link

gabbhack commented Jul 2, 2023

Description

Structure:

  • parse/pragmas.nim
  • pragmas.nim
  • main.nim
# parse/pragmas.nim content

proc foo*() = discard
# pragmas.nim content

template bar*() = discard
# main.nim content

from parse/pragmas as parse_pragmas import foo

import pragmas

pragmas.bar()

Nim Version

Nim Compiler Version 1.6.14 [Windows: amd64]
Compiled at 2023-06-27
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release

Current Output

main.nim(5, 8) Error: ambiguous identifier: 'pragmas'

Expected Output

nothing

Possible Solution

No response

Additional Information

Works as expected at Nim 1.6.12

@ringabout
Copy link
Member

I'm bisecting it.

@ringabout
Copy link
Member

The culprit commit => #21628

Araq pushed a commit that referenced this issue Jul 3, 2023
#22211)

fixes #22208; Ambiguous error when import modules with same names but different aliases
@jmgomez
Copy link
Collaborator

jmgomez commented Jul 3, 2023

The culprit commit => #21628

Upps, sorry about that

bung87 pushed a commit to bung87/Nim that referenced this issue Jul 29, 2023
…ames but… (nim-lang#22211)

fixes nim-lang#22208; Ambiguous error when import modules with same names but different aliases
narimiran pushed a commit that referenced this issue Aug 11, 2023
#22211)

fixes #22208; Ambiguous error when import modules with same names but different aliases

(cherry picked from commit d9a24b9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants