Fixing issue #1090

This commit is contained in:
Clay Sweetser 2014-06-07 23:29:53 -04:00
commit ca1c516295
2 changed files with 7 additions and 3 deletions

View file

@ -828,6 +828,9 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
getCurrOwner(), s.info) getCurrOwner(), s.info)
proc semTypeSection(c: PContext, n: PNode): PNode = proc semTypeSection(c: PContext, n: PNode): PNode =
## Processes a type section. This must be done in separate passes, in order
## to allow the type definitions in the section to reference each other
## without regard for the order of their definitions.
typeSectionLeftSidePass(c, n) typeSectionLeftSidePass(c, n)
typeSectionRightSidePass(c, n) typeSectionRightSidePass(c, n)
typeSectionFinalPass(c, n) typeSectionFinalPass(c, n)

View file

@ -1152,11 +1152,12 @@ proc computeRecSizeAux(n: PNode, a, currOffset: var BiggestInt): BiggestInt =
result = computeSizeAux(n.sym.typ, a) result = computeSizeAux(n.sym.typ, a)
n.sym.offset = int(currOffset) n.sym.offset = int(currOffset)
else: else:
internalError("computeRecSizeAux()") # internalError("computeRecSizeAux()")
n.debug
a = 1 a = 1
result = - 1 result = - 2
const const
szIllegalRecursion* = -2 szIllegalRecursion* = -2
szUnknownSize* = -1 szUnknownSize* = -1