summary refs log tree commit diff stats
path: root/tests/template/tobjectdeclfield.nim
blob: 201f076ca364d7930e4e9032abbc414c71cc2689 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
var x = 0

block:
  type Foo = object
    x: float # ok

template main() =
  block:
    type Foo = object
      x: float # Error: cannot use symbol of kind 'var' as a 'field'

main()