Open
Description
block label
matching template with untyped param treats param as typed, causing error
Example 1
template fun*(a: untyped) = discard
block fun: # BUG
# block: # fun # works
fun(bar)
Current Output
Error: undeclared identifier: 'bar'
Expected Output
works
Example 2: until this is fixed, block label:
should be avoided in tests
typical example: Error: attempting to call routine: 'decodeQuery`gensym0'
import std/[uri]
template main =
block decodeQuery:
for ai in decodeQuery("a=1&b=0"): discard
main()
Additional Information
- devel 9ebbe00 1.3.5
- prevents using
block elementType:
in add typetraits.elementType #14780 for example