minor improvement towards tgenericshardcases

This commit is contained in:
Zahary Karadjov
2013-08-28 00:21:38 +03:00
parent 52b00630c8
commit 01ccb52a00
4 changed files with 42 additions and 24 deletions

View File

@@ -248,7 +248,11 @@ proc semLowHigh(c: PContext, n: PNode, m: TMagic): PNode =
of tyInt..tyInt64, tyChar, tyBool, tyEnum, tyUInt8, tyUInt16, tyUInt32:
# do not skip the range!
n.typ = n.sons[1].typ.skipTypes(abstractVar)
else: LocalError(n.info, errInvalidArgForX, opToStr[m])
of tyGenericParam:
# leave it for now, it will be resolved in semtypinst
n.typ = getSysType(tyInt)
else:
LocalError(n.info, errInvalidArgForX, opToStr[m])
result = n
proc semSizeof(c: PContext, n: PNode): PNode =