fixes regression: tobjconstr2 test works again

This commit is contained in:
Araq
2015-10-14 00:41:27 +02:00
parent f4bfa076ae
commit a40ace648d
2 changed files with 2 additions and 2 deletions

View File

@@ -1155,7 +1155,7 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
let field = lookupFieldAgain(p, ty, it.sons[0].sym, tmp2.r)
if field.loc.r == nil: internalError(e.info, "genObjConstr")
if it.len == 3 and optFieldCheck in p.options:
genFieldCheck(p, it.sons[2], tmp2.r, field, ty)
genFieldCheck(p, it.sons[2], r, field, ty)
add(tmp2.r, ".")
add(tmp2.r, field.loc.r)
tmp2.k = locTemp

View File

@@ -24,7 +24,7 @@ var b = Bar(x: 100, y: 200) # used to fail
# bug 1275
type
Graphic = object of TObject
Graphic = object of RootObj
case kind: range[0..1]
of 0:
radius: float