fixes #1011
This commit is contained in:
parent
d80d8aa74d
commit
eb99c27bd0
3 changed files with 49 additions and 3 deletions
8
tests/generics/mdotlookup.nim
Normal file
8
tests/generics/mdotlookup.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
proc baz(o: any): int = 5 # if bar is exported, it works
|
||||
|
||||
type MyObj = object
|
||||
x: int
|
||||
|
||||
proc foo*(b: any) =
|
||||
var o: MyObj
|
||||
echo b.baz, " ", o.x.baz, " ", b.baz()
|
||||
7
tests/generics/tdotlookup.nim
Normal file
7
tests/generics/tdotlookup.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
discard """
|
||||
output: '''5 5 5'''
|
||||
"""
|
||||
|
||||
import mdotlookup
|
||||
|
||||
foo(7)
|
||||
Loading…
Add table
Add a link
Reference in a new issue