fixes #2603
This commit is contained in:
parent
1cb14f888a
commit
22b5f4df54
2 changed files with 8 additions and 8 deletions
|
|
@ -16,9 +16,9 @@ proc ithField(n: PNode, field: int): PSym =
|
||||||
result = nil
|
result = nil
|
||||||
case n.kind
|
case n.kind
|
||||||
of nkRecList:
|
of nkRecList:
|
||||||
for i in countup(0, sonsLen(n) - 1):
|
for i in countup(0, sonsLen(n) - 1):
|
||||||
result = ithField(n.sons[i], field-i)
|
result = ithField(n.sons[i], field-i)
|
||||||
if result != nil: return
|
if result != nil: return
|
||||||
of nkRecCase:
|
of nkRecCase:
|
||||||
if n.sons[0].kind != nkSym: internalError(n.info, "ithField")
|
if n.sons[0].kind != nkSym: internalError(n.info, "ithField")
|
||||||
result = ithField(n.sons[0], field-1)
|
result = ithField(n.sons[0], field-1)
|
||||||
|
|
@ -34,7 +34,7 @@ proc ithField(n: PNode, field: int): PSym =
|
||||||
else: discard
|
else: discard
|
||||||
|
|
||||||
proc annotateType*(n: PNode, t: PType) =
|
proc annotateType*(n: PNode, t: PType) =
|
||||||
let x = t.skipTypes(abstractInst)
|
let x = t.skipTypes(abstractInst+{tyRange})
|
||||||
# Note: x can be unequal to t and we need to be careful to use 't'
|
# Note: x can be unequal to t and we need to be careful to use 't'
|
||||||
# to not to skip tyGenericInst
|
# to not to skip tyGenericInst
|
||||||
case n.kind
|
case n.kind
|
||||||
|
|
@ -80,7 +80,7 @@ proc annotateType*(n: PNode, t: PType) =
|
||||||
if x.kind in {tyString, tyCString}:
|
if x.kind in {tyString, tyCString}:
|
||||||
n.typ = t
|
n.typ = t
|
||||||
else:
|
else:
|
||||||
globalError(n.info, "string literal must be of some string type")
|
globalError(n.info, "string literal must be of some string type")
|
||||||
of nkNilLit:
|
of nkNilLit:
|
||||||
if x.kind in NilableTypes:
|
if x.kind in NilableTypes:
|
||||||
n.typ = t
|
n.typ = t
|
||||||
|
|
|
||||||
8
todo.txt
8
todo.txt
|
|
@ -1,10 +1,6 @@
|
||||||
version 0.10.4
|
version 0.10.4
|
||||||
==============
|
==============
|
||||||
|
|
||||||
- make 'nil' work for 'add':
|
|
||||||
- resizeString
|
|
||||||
- incrSeq
|
|
||||||
- addChar
|
|
||||||
|
|
||||||
|
|
||||||
version 0.10.6 (RC1?)
|
version 0.10.6 (RC1?)
|
||||||
|
|
@ -15,6 +11,10 @@ version 0.10.6 (RC1?)
|
||||||
- finish 'parallel' or mark as experimental
|
- finish 'parallel' or mark as experimental
|
||||||
- Deprecate ``immediate`` for templates and macros
|
- Deprecate ``immediate`` for templates and macros
|
||||||
- special case varargs[untyped] and varargs[typed]
|
- special case varargs[untyped] and varargs[typed]
|
||||||
|
- make 'nil' work for 'add':
|
||||||
|
- resizeString
|
||||||
|
- incrSeq
|
||||||
|
- addChar
|
||||||
|
|
||||||
|
|
||||||
version 1.0
|
version 1.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue