mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
* consider object types as declarative in templates
fixes #16005
* correct logic for nkRecList children, inject fields
* don't actually inject fields
(cherry picked from commit 3ac2d81601)
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()
|