I think that all base-type references will be compatible with polymorphism, as now the passed by base-type references to procedures and the returned base-type references from functions (in addition to base-type pointers and dereferenced base-type pointers).
But will we able to define arrays of references (and also arrays of base-type references compatible also with polymorphism)?
Code: Select all
Dim As Integer I1
Dim As Integer I2
Dim As Integer I3
'' array of integer references
Dim Byref As Integer RI(1 To 3) = {I1, I2, I3}
'or
Type Parent Extends Object : End Type
Type Child1 Extends Parent : End Type
Type Child2 Extends Parent : End Type
Type Child3 Extends Parent : End Type
Dim As Child1 c1
Dim As Child2 c2
Dim As Child3 c3
'' array of base-type references to derived-type objects, compatible with polymorphism
Dim Byref As Parent RP(1 To 3) = {c1, c2, c3}