fixes regression: tobjconstr2 test works again
This commit is contained in:
parent
f4bfa076ae
commit
a40ace648d
2 changed files with 2 additions and 2 deletions
|
|
@ -1155,7 +1155,7 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
|
||||||
let field = lookupFieldAgain(p, ty, it.sons[0].sym, tmp2.r)
|
let field = lookupFieldAgain(p, ty, it.sons[0].sym, tmp2.r)
|
||||||
if field.loc.r == nil: internalError(e.info, "genObjConstr")
|
if field.loc.r == nil: internalError(e.info, "genObjConstr")
|
||||||
if it.len == 3 and optFieldCheck in p.options:
|
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, ".")
|
||||||
add(tmp2.r, field.loc.r)
|
add(tmp2.r, field.loc.r)
|
||||||
tmp2.k = locTemp
|
tmp2.k = locTemp
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ var b = Bar(x: 100, y: 200) # used to fail
|
||||||
# bug 1275
|
# bug 1275
|
||||||
|
|
||||||
type
|
type
|
||||||
Graphic = object of TObject
|
Graphic = object of RootObj
|
||||||
case kind: range[0..1]
|
case kind: range[0..1]
|
||||||
of 0:
|
of 0:
|
||||||
radius: float
|
radius: float
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue