tfunc_type.nim 262 B

1234567891011121314
  1. discard """
  2. errormsg: "func keyword is not allowed in type descriptions, use proc with {.noSideEffect.} pragma instead"
  3. """
  4. type
  5. MyObject = object
  6. fn: func(a: int): int
  7. proc myproc(a: int): int =
  8. echo "bla"
  9. result = a
  10. var x = MyObject(fn: myproc)