mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-11 22:08:54 +00:00
fixes #1965
This commit is contained in:
@@ -57,7 +57,7 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym,
|
||||
of skUnknown:
|
||||
# Introduced in this pass! Leave it as an identifier.
|
||||
result = n
|
||||
of skProc, skMethod, skIterators, skConverter:
|
||||
of skProc, skMethod, skIterators, skConverter, skModule:
|
||||
result = symChoice(c, n, s, scOpen)
|
||||
of skTemplate:
|
||||
if macroToExpand(s):
|
||||
@@ -225,7 +225,7 @@ proc semGenericStmt(c: PContext, n: PNode,
|
||||
of skUnknown, skParam:
|
||||
# Leave it as an identifier.
|
||||
discard
|
||||
of skProc, skMethod, skIterators, skConverter:
|
||||
of skProc, skMethod, skIterators, skConverter, skModule:
|
||||
result.sons[0] = symChoice(c, fn, s, scOption)
|
||||
first = 1
|
||||
of skGenericParam:
|
||||
|
||||
2
tests/generics/mmodule_same_as_proc.nim
Normal file
2
tests/generics/mmodule_same_as_proc.nim
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
proc mmodule_same_as_proc*(x: string) = discard
|
||||
9
tests/generics/tmodule_same_as_proc.nim
Normal file
9
tests/generics/tmodule_same_as_proc.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# bug #1965
|
||||
|
||||
import mmodule_same_as_proc
|
||||
|
||||
proc test[T](t: T) =
|
||||
mmodule_same_as_proc"a"
|
||||
|
||||
test(0)
|
||||
Reference in New Issue
Block a user