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

Rafael Lima <rafael.palma.l...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rafael.palma.l...@gmail.com

--- Comment #6 from Rafael Lima <rafael.palma.l...@gmail.com> ---
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.

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

Reply via email to