fixes #1805
This commit is contained in:
parent
0591c68aaf
commit
08c0ba379a
10 changed files with 275 additions and 733 deletions
19
tests/parser/ttypeof.nim
Normal file
19
tests/parser/ttypeof.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
discard """
|
||||
output: '''12
|
||||
int
|
||||
int
|
||||
int'''
|
||||
"""
|
||||
|
||||
import typetraits
|
||||
|
||||
# bug #1805
|
||||
|
||||
proc foob(x: int): string = "foo"
|
||||
proc barb(x: string): int = 12
|
||||
|
||||
echo(foob(10).barb()) # works
|
||||
echo(type(10).name()) # doesn't work
|
||||
|
||||
echo(name(type(10))) # works
|
||||
echo((type(10)).name()) # works
|
||||
Loading…
Add table
Add a link
Reference in a new issue