bugfix: code generator can deal with ftpclient.nim
This commit is contained in:
parent
be1a709e7e
commit
4577751bad
1 changed files with 4 additions and 0 deletions
|
|
@ -721,6 +721,10 @@ proc genTypeInfoAux(m: BModule, typ: PType, name: PRope) =
|
||||||
genTypeInfoAuxBase(m, typ, name, base)
|
genTypeInfoAuxBase(m, typ, name, base)
|
||||||
|
|
||||||
proc discriminatorTableName(m: BModule, objtype: PType, d: PSym): PRope =
|
proc discriminatorTableName(m: BModule, objtype: PType, d: PSym): PRope =
|
||||||
|
# bugfix: we need to search the type that contains the discriminator:
|
||||||
|
var objtype = objtype
|
||||||
|
while lookupInRecord(objtype.n, d.name) == nil:
|
||||||
|
objtype = objtype.sons[0]
|
||||||
if objType.sym == nil:
|
if objType.sym == nil:
|
||||||
InternalError(d.info, "anonymous obj with discriminator")
|
InternalError(d.info, "anonymous obj with discriminator")
|
||||||
result = ropef("NimDT_$1_$2", [
|
result = ropef("NimDT_$1_$2", [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue