mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 04:24:45 +00:00
fixes #16671 related to https://github.com/nim-lang/Nim/pull/18911
This commit is contained in:
@@ -35,3 +35,25 @@ block: # bug #15778
|
||||
doAssert @(reader.read(3)) == @['l', 'l', 'o']
|
||||
doAssert count == 2
|
||||
|
||||
block: # bug #16671
|
||||
block:
|
||||
type X = ref object of RootObj
|
||||
type Y = ref object of X
|
||||
field: openArray[int]
|
||||
|
||||
var s: seq[X]
|
||||
proc f() =
|
||||
s.add(Y(field: [1]))
|
||||
|
||||
f()
|
||||
|
||||
block:
|
||||
type X = ref object of RootObj
|
||||
type Y = ref object of X
|
||||
field: openArray[int]
|
||||
|
||||
var s: seq[X]
|
||||
proc f() =
|
||||
s.add(Y(field: toOpenArray([1, 2, 3], 0, 1)))
|
||||
|
||||
f()
|
||||
|
||||
Reference in New Issue
Block a user