tphi.nim 400 B

123456789101112131415161718192021222324
  1. discard """
  2. nimout: '''tphi.nim(9, 10) Warning: BEGIN [User]
  3. tphi.nim(22, 10) Warning: END [User]'''
  4. cmd: "drnim $file"
  5. action: "compile"
  6. """
  7. import std/logic
  8. {.push staticBoundChecks: defined(nimDrNim).}
  9. {.warning: "BEGIN".}
  10. proc testAsgn(y: int) =
  11. var a = y
  12. if a > 0:
  13. if a > 3:
  14. a = a + 2
  15. else:
  16. a = a + 1
  17. {.assert: a > 1.}
  18. testAsgn(3)
  19. {.warning: "END".}
  20. {.pop.}