semTemplateDef and t17433 clean-ups (#17448)

- use `doAssert` in t17433
- use setGenericParamsMisc in semTemplateDef akin to semProcAux
- pragma handling in semTemplateDef inline with semProcAux
This commit is contained in:
Saem Ghani 2021-03-22 04:46:34 -07:00 • committed by GitHub
commit e5873b3a93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 41 deletions

View file

@ -7,10 +7,10 @@
from std/macros import expandMacros
proc bar(a: typedesc): a = default(a)
assert bar(float) == 0.0
assert bar(string) == ""
doAssert bar(float) == 0.0
doAssert bar(string) == ""
template main =
proc baz(a: typedesc): a = default(a)
assert baz(float) == 0.0
doAssert baz(float) == 0.0
main()