Trim remaining expr/stmt from stdlib (#6742)

This commit is contained in:
Lynn C. Rees 2017-11-15 09:34:48 -07:00 • committed by Andreas Rumpf
commit 0ab373115c
9 changed files with 16 additions and 16 deletions

View file

@ -87,10 +87,10 @@ proc newSharedString*(s: string): SharedString =
result.len = len
when declared(atomicLoadN):
template load(x): expr = atomicLoadN(addr x, ATOMIC_SEQ_CST)
template load(x): untyped = atomicLoadN(addr x, ATOMIC_SEQ_CST)
else:
# XXX Fixme
template load(x): expr = x
template load(x): untyped = x
proc add*(s: var SharedString; t: cstring; len: Natural) =
if len == 0: return

View file

@ -841,7 +841,7 @@ elif not defined(useNimRtl):
var attr: Tposix_spawnattr
var fops: Tposix_spawn_file_actions
template chck(e: expr) =
template chck(e: untyped) =
if e != 0'i32: raiseOSError(osLastError())
chck posix_spawn_file_actions_init(fops)

View file

@ -21,7 +21,7 @@ proc name*(t: typedesc): string {.magic: "TypeTrait".}
##
## proc `$`*(T: typedesc): string = name(T)
##
## template test(x): stmt =
## template test(x): typed =
## echo "type: ", type(x), ", value: ", x
##
## test 42