mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
* Fixes Naive virtual crash the compiler fixes #22269 * adds type specific test
This commit is contained in:
@@ -774,7 +774,7 @@ proc getRecordDesc(m: BModule; typ: PType, name: Rope,
|
||||
result = structOrUnion & " " & name
|
||||
result.add(getRecordDescAux(m, typ, name, baseType, check, hasField))
|
||||
let desc = getRecordFields(m, typ, check)
|
||||
if not hasField:
|
||||
if not hasField and typ.itemId notin m.g.graph.memberProcsPerType:
|
||||
if desc == "":
|
||||
result.add("\tchar dummy;\n")
|
||||
elif typ.len == 1 and typ.n[0].kind == nkSym:
|
||||
|
||||
@@ -74,4 +74,8 @@ var val : int32 = 10
|
||||
NimPrinter().printConstRef(message, val)
|
||||
NimPrinter().printConstRef2(message, val)
|
||||
|
||||
#bug 22269
|
||||
type Doo = object
|
||||
proc naiveMember(x: Doo): int {. virtual .} = 2
|
||||
discard naiveMember(Doo())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user