mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
Currently `struct.field` will generate a node with `info` that points to the symbol definition instead of having the actual node location.
16 lines
294 B
Nim
16 lines
294 B
Nim
# tests for use and structures
|
|
|
|
type
|
|
Foo* = ref object of RootObj
|
|
bar*: string
|
|
|
|
proc test(f: Foo) =
|
|
echo f.#[!]#bar
|
|
|
|
discard """
|
|
$nimsuggest --tester $file
|
|
>use $1
|
|
def skField tuse_structure.Foo.bar string $file 5 4 "" 100
|
|
use skField tuse_structure.Foo.bar string $file 8 9 "" 100
|
|
"""
|