mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
18 lines
267 B
Nim
18 lines
267 B
Nim
|
|
# 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()
|