interpret tuple as a class and tuple[] as the empty tuple
When the indentation syntax is allowed it is always interpreted as a tuple: type Unit = tuple
This commit is contained in:
parent
bab8190b67
commit
9c126282b2
8 changed files with 16 additions and 11 deletions
|
|
@ -68,7 +68,6 @@ proc renderType(n: PNode): string =
|
|||
assert n[i].kind == nkIdent
|
||||
result.add(',' & typeStr)
|
||||
of nkTupleTy:
|
||||
assert len(n) > 0
|
||||
result = "tuple["
|
||||
for i in 0 .. <len(n): result.add(renderType(n[i]) & ',')
|
||||
result[<len(result)] = ']'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue