Fix some usages of typedesc in async procs

This also fixes a compilation error in modules, based only on the
new async module (i.e. not importing the full asyncdispatch)
This commit is contained in:
Zahary Karadjov 2018-04-13 12:44:47 +03:00
commit 10142e4a80
3 changed files with 42 additions and 8 deletions

View file

@ -186,7 +186,8 @@ proc getEnvParam*(routine: PSym): PSym =
proc interestingVar(s: PSym): bool {.inline.} =
result = s.kind in {skVar, skLet, skTemp, skForVar, skParam, skResult} and
sfGlobal notin s.flags
sfGlobal notin s.flags and
s.typ.kind notin {tyStatic, tyTypeDesc}
proc illegalCapture(s: PSym): bool {.inline.} =
result = skipTypes(s.typ, abstractInst).kind in