diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-08-13 11:41:33 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-13 11:41:33 +0200 |
commit | dae5450947e93e2e5222ae2710874186bf27bf39 (patch) | |
tree | ddb9da438bb516d81491af41ef646abf34d67406 /compiler/ccgcalls.nim | |
parent | 32afc1a562579d38e82ebb385186767dfb1bc3c8 (diff) | |
download | Nim-dae5450947e93e2e5222ae2710874186bf27bf39.tar.gz |
WIP: disallow 'nil' for strings and seqs
Diffstat (limited to 'compiler/ccgcalls.nim')
-rw-r--r-- | compiler/ccgcalls.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index 9712d5dce..2621574a6 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -431,7 +431,7 @@ proc genInfixCall(p: BProc, le, ri: PNode, d: var TLoc) = assert(sonsLen(typ) == sonsLen(typ.n)) # don't call '$' here for efficiency: let pat = ri.sons[0].sym.loc.r.data - internalAssert p.config, pat != nil + internalAssert p.config, pat.len > 0 if pat.contains({'#', '(', '@', '\''}): var pl = genPatternCall(p, ri, pat, typ) # simpler version of 'fixupCall' that works with the pl+params combination: @@ -480,7 +480,7 @@ proc genNamedParamCall(p: BProc, ri: PNode, d: var TLoc) = # don't call '$' here for efficiency: let pat = ri.sons[0].sym.loc.r.data - internalAssert p.config, pat != nil + internalAssert p.config, pat.len > 0 var start = 3 if ' ' in pat: start = 1 |