mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
22 lines
296 B
Nim
22 lines
296 B
Nim
discard """
|
|
output: "0"
|
|
"""
|
|
|
|
|
|
# bug #5135
|
|
proc fail*[E](e: E): void =
|
|
raise newException(Exception, e)
|
|
|
|
# bug #4875
|
|
type Bar = object
|
|
mFoo: int
|
|
|
|
template foo(a: Bar): int = a.mFoo
|
|
|
|
proc main =
|
|
let foo = 5 # Rename this to smth else to make it work
|
|
var b: Bar
|
|
echo b.foo
|
|
|
|
main()
|