diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-05-11 10:11:08 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-11 10:11:08 +0200 |
commit | b92fd30282f5063117ae4616aba366f5f445ed8e (patch) | |
tree | 6b4ac1523c4247a22c9900bf8c5a7166d91f9335 /compiler/suggest.nim | |
parent | f03391d4775bffb3f51c9be47baf04f8b49e2900 (diff) | |
download | Nim-b92fd30282f5063117ae4616aba366f5f445ed8e.tar.gz |
rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)
Diffstat (limited to 'compiler/suggest.nim')
-rw-r--r-- | compiler/suggest.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/suggest.nim b/compiler/suggest.nim index 6ae7c216f..e98451510 100644 --- a/compiler/suggest.nim +++ b/compiler/suggest.nim @@ -258,7 +258,7 @@ proc getQuality(s: PSym): range[0..100] = if s.typ != nil and s.typ.len > 1: var exp = s.typ.sons[1].skipTypes({tyGenericInst, tyVar, tyLent, tyAlias, tySink}) if exp.kind == tyVarargs: exp = elemType(exp) - if exp.kind in {tyExpr, tyStmt, tyGenericParam, tyAnything}: return 50 + if exp.kind in {tyUntyped, tyTyped, tyGenericParam, tyAnything}: return 50 return 100 template wholeSymTab(cond, section: untyped) = @@ -319,7 +319,7 @@ proc suggestCall(c: PContext, n, nOrig: PNode, outputs: var Suggestions) = proc typeFits(c: PContext, s: PSym, firstArg: PType): bool {.inline.} = if s.typ != nil and sonsLen(s.typ) > 1 and s.typ.sons[1] != nil: - # special rule: if system and some weird generic match via 'tyExpr' + # special rule: if system and some weird generic match via 'tyUntyped' # or 'tyGenericParam' we won't list it either to reduce the noise (nobody # wants 'system.`-|` as suggestion let m = s.getModule() @@ -327,7 +327,7 @@ proc typeFits(c: PContext, s: PSym, firstArg: PType): bool {.inline.} = if s.kind == skType: return var exp = s.typ.sons[1].skipTypes({tyGenericInst, tyVar, tyLent, tyAlias, tySink}) if exp.kind == tyVarargs: exp = elemType(exp) - if exp.kind in {tyExpr, tyStmt, tyGenericParam, tyAnything}: return + if exp.kind in {tyUntyped, tyTyped, tyGenericParam, tyAnything}: return result = sigmatch.argtypeMatches(c, s.typ.sons[1], firstArg) proc suggestOperations(c: PContext, n, f: PNode, typ: PType, outputs: var Suggestions) = |