type
Thing = concept t
work(t)
proc start(t: Thing) =
t.work()
# work(t) # undeclared identifier
I do not understand why Nim cannot find the declaration of work for the commented line. Is this a limitation of generics or Nim's type checking?
Bonus Q: Will (RFC 168)[https://github.com/nim-lang/RFCs/issues/168] make this compile?
Of some note:
type
Thing = concept t
work(t)
proc start(t: Thing) =
mixin work
t.work()
work(t) # undeclared identifier
Will make it work :P