You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeFruit=objectofRootObj
name: stringApple=objectofFruitBanana=objectofFruitvar
ir =Fruit(name: "Fruit")
ia =Apple(name: "apple")
ib =Banana(name: "banana")
let x = [ia.addr, ib.addr, ir.addr]
for c in x:
echocast[int](c)
the second example, differ only in generics, failed to compile
typeVehicle[T] =objectofRootObj
tire: T
Car[T] =objectofVehicle[T]
Bike[T] =objectofVehicle[T]
var v =Vehicle[int](tire: 3)
var c =Car[int](tire: 4)
var b =Bike[int](tire: 2)
let y = [b.addr, c.addr, v.addr]
this bug was found during #4799 investigation, and needed to fixed before #4799
note: ref object and ref generic is ok, only ptr generic failed
The text was updated successfully, but these errors were encountered:
the first example is the working example
the second example, differ only in generics, failed to compile
this bug was found during #4799 investigation, and needed to fixed before #4799
note: ref object and ref generic is ok, only ptr generic failed
The text was updated successfully, but these errors were encountered: