I have this code:
Class cClass
End Class
Class cClassSub
Inherits cClass
Public pText As String
End Class
Function Test() As cClass()
Var oEssais() As cClassSub
Var vVariant As Variant
Var vSuccess As Boolean
vVariant = oEssais
If vVariant IsA cClass Then
vSuccess = True // No
Else
vSuccess = False // Yes…
End If
// Return oEssais : Works
Return vVariant // Fails
End Function
If my array was not empty, it would work as intended, but with an empty array, the IsA
and the Return
fails. Is this a bug, or should I do a feature request?
Regards, Antoine
2 posts - 2 participants