mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
* consider object types as declarative in templates fixes #16005 * correct logic for nkRecList children, inject fields * don't actually inject fields
13 lines
183 B
Nim
13 lines
183 B
Nim
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()
|