Skip to content

fieldPairs bug has ugly error message #7533

@timotheecour

Description

@timotheecour
import typetraits type Myobj=object x1:int var x:Myobj # the two symbols with the identifier ``name`` will clash. for name, value in x.fieldPairs: # BUG: ???(???, 0) Error: in expression 'type(x.x1)."x1"': identifier expected, but found '"x1"' echo value.type.name
  • should not be an error
  • error should at least not contain ???

workaround

import typetraits type Myobj=object x1:int var x:Myobj for fieldname, value in x.fieldPairs: echo value.type.name

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions