mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
* test case haul for old generic/template/macro issues closes #12582, closes #19552, closes #2465, closes #4596, closes #15246, closes #12683, closes #7889, closes #4547, closes #12415, closes #2002, closes #1771, closes #5121 The test for #5648 is also moved into its own test from `types/tissues_types` due to not being joinable. * fix template gensym test
22 lines
327 B
Nim
22 lines
327 B
Nim
block: # issue #16005
|
|
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()
|
|
|
|
block: # issue #19552
|
|
template test =
|
|
type
|
|
test2 = ref object
|
|
reset: int
|
|
|
|
test()
|