mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes regression: tobjconstr2 test works again
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user