fix: var a{.foo.} = expr inside templates (refs #15920) (except when foo is overloaded) (#13869)

* fix: `var a{.foo.} = expr` inside templates
* add test
* improve tdecls test
* improve tests
* add failing test
* PRTEMP
* fixup
This commit is contained in:
Timothee Cour 2021-08-11 03:17:17 -07:00 • committed by GitHub
commit 6c1bd4bb1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 20 deletions

View file

@ -27,6 +27,6 @@ since (99, 3):
doAssert false
when false:
# pending https://github.com/timotheecour/Nim/issues/129
# pending bug #15920
# Error: cannot attach a custom pragma to 'fun3'
template fun3(): int {.since: (1, 3).} = 12