tnoalias.nim 291 B

1234567891011121314
  1. discard """
  2. ccodecheck: "\\i@'NI* NIM_NOALIAS field;' @'NIM_CHAR* NIM_NOALIAS x,' @'void* NIM_NOALIAS q'"
  3. """
  4. type
  5. BigNum = object
  6. field {.noalias.}: ptr UncheckedArray[int]
  7. proc p(x {.noalias.}: openArray[char]) =
  8. var q {.noalias.}: pointer = addr(x[0])
  9. var bn: BigNum
  10. p "abc"