https://bugs.documentfoundation.org/show_bug.cgi?id=161315

--- Comment #7 from Andreas Heinisch <[email protected]> ---
(In reply to Rafael Lima from comment #6)
> I'd say the problem is not only the inability to use Empty as a default
> argument, but also that the interpreter assumes that an argument is Empty in
> a peculiar manner. Consider the following code:
> 
> sub foo2(Optional v As Variant)
>     MsgBox IsEmpty(v)
>     MsgBox IsMissing(v)
> end sub
> 
> sub bar2
>     foo2
> end sub
> 
> This will return False and True which to me is the expected behavior.
> However, the following code:
> 
> sub foo3(Optional v As Variant, Optional text As String)
>     MsgBox IsEmpty(v)
>     MsgBox IsMissing(v)
> end sub
> 
> sub bar3
>     foo3(text := "dummy")
> end sub
> 
> ... will return True and False, which is the opposite of what I would
> expect, since "v" is missing and it was not defined as Empty. See bug 143706
> (already referred here).
> 
> I guess we need to fix bug 143706 alongside with this one to have a coherent
> behavior.

This is the old question about what IsEmpty and IsMissing are actual about and
should be addressed in bug 149959 even after bug 143706 (hopefully) will be
closed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to