-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
type
SBase[T, V] = ref object of RootObj
val: T
color: V
SRC = ref object of SBase[string, int]
SRD = ref object of SBase[string, int]
var a = SBase[string, int](val: "base", color: 1)
var b = SRC(val: "rc", color: 2)
var c = SRD(val: "rd", color: 3)
var x = [a, b, c] #ok
var y = [b, c, a] #failed
var z = [c, b, a] #failedwhat need to be included in the test:
- the above case
- secondary form of ref -> e.g. from new(ref someobject)
- ptr form, and it's secondary form
ordinary object -> perhaps generate runtime error because of object slicing
see the evolution of this bug in #7601, #7818, and #7906
note: if possible, uncomment test at block test_t4799_6 of #4799