basic generic collections implemented and tested

This commit is contained in:
Araq 2011-06-07 03:37:36 +02:00
commit 3bc821aa5c
10 changed files with 512 additions and 95 deletions

View file

@ -83,11 +83,11 @@ proc semSym(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
markUsed(n, s)
result = newSymNode(s, n.info)
proc checkConversionBetweenObjects(info: TLineInfo, castDest, src: PType) =
proc checkConversionBetweenObjects(info: TLineInfo, castDest, src: PType) =
var diff = inheritanceDiff(castDest, src)
if diff == high(int):
GlobalError(info, errGenerated, `%`(MsgKindToString(errIllegalConvFromXtoY), [
typeToString(src), typeToString(castDest)]))
if diff == high(int):
GlobalError(info, errGenerated, MsgKindToString(errIllegalConvFromXtoY) % [
src.typeToString, castDest.typeToString])
proc checkConvertible(info: TLineInfo, castDest, src: PType) =
const