fixes an old ARC bug: the produced copy/sink operations don't copy the hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232)
This commit is contained in:
parent
4f64c9fae5
commit
32d4bf3525
6 changed files with 38 additions and 2 deletions
|
|
@ -30,6 +30,7 @@ ok
|
|||
true
|
||||
copying
|
||||
123
|
||||
42
|
||||
closed
|
||||
destroying variable: 20
|
||||
destroying variable: 10
|
||||
|
|
@ -482,3 +483,17 @@ method testMethod(self: BrokenObject) {.base.} =
|
|||
|
||||
let mikasa = BrokenObject()
|
||||
mikasa.testMethod()
|
||||
|
||||
# bug #19205
|
||||
type
|
||||
InputSectionBase* = object of RootObj
|
||||
relocations*: seq[int] # traced reference. string has a similar SIGSEGV.
|
||||
InputSection* = object of InputSectionBase
|
||||
|
||||
proc fooz(sec: var InputSectionBase) =
|
||||
if sec of InputSection: # this line SIGSEGV.
|
||||
echo 42
|
||||
|
||||
var sec = create(InputSection)
|
||||
sec[] = InputSection(relocations: newSeq[int]())
|
||||
fooz sec[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue