tconfusinglocal.nim 296 B

12345678910111213141516171819202122
  1. discard """
  2. output: "0"
  3. """
  4. # bug #5135
  5. proc fail*[E](e: E): void =
  6. raise newException(Exception, e)
  7. # bug #4875
  8. type Bar = object
  9. mFoo: int
  10. template foo(a: Bar): int = a.mFoo
  11. proc main =
  12. let foo = 5 # Rename this to smth else to make it work
  13. var b: Bar
  14. echo b.foo
  15. main()