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
Currently, it is not possible to pass in subtyped objects in varags arguments.
type
Base = ref object of RootObj
A = ref object of Base
B = ref object of Base
proc test(oa: varargs[Base]) = discard
#test(A())) # FAILS TO COMPILE:
# Error: type mismatch: got (A)
# but expected one of:
# proc test(oa: varargs[Base])
#test(A(), B()) # FAILS TO COMPILE:
# Error: type mismatch: got (A, B)
# but expected one of:
# proc test(oa: varargs[Base])
The text was updated successfully, but these errors were encountered:
Currently, it is not possible to pass in subtyped objects in varags arguments.
The text was updated successfully, but these errors were encountered: