tconstprocassignments.nim 165 B

12345678910111213141516171819
  1. discard """
  2. output: '''
  3. 100
  4. 100
  5. '''
  6. """
  7. proc f():int {.compileTime.} = 100
  8. const F = f
  9. echo F()
  10. const G = proc ():int =
  11. let x = f
  12. let y = x
  13. y()
  14. echo G()