tvarres1.nim 195 B

123456789101112131415161718
  1. discard """
  2. file: "tvarres1.nim"
  3. line: 12
  4. errormsg: "address of 'bla' may not escape its stack frame"
  5. """
  6. var
  7. g = 5
  8. proc p(): var int =
  9. var bla: int
  10. result = bla
  11. p() = 45
  12. echo g