Merge pull request #2499 from JosephTurner/fix-uint-segv

Fixes #1986 when calling sameConstant on uint
This commit is contained in:
Andreas Rumpf 2015-04-09 09:37:05 +02:00
commit fdadc177d4
2 changed files with 11 additions and 1 deletions

View file

@ -368,7 +368,7 @@ proc sameConstant*(a, b: PNode): bool =
case a.kind
of nkSym: result = a.sym == b.sym
of nkIdent: result = a.ident.id == b.ident.id
of nkCharLit..nkInt64Lit: result = a.intVal == b.intVal
of nkCharLit..nkUInt64Lit: result = a.intVal == b.intVal
of nkFloatLit..nkFloat64Lit: result = a.floatVal == b.floatVal
of nkStrLit..nkTripleStrLit: result = a.strVal == b.strVal
of nkType, nkNilLit: result = a.typ == b.typ