mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 19:23:57 +00:00
fixes #1011
This commit is contained in:
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)
|
||||
Reference in New Issue
Block a user