[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Dec 7 10:20:44 UTC 2019


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

--- Comment #14 from Mike Kaganski <mikekaganski at hotmail.com> ---
This is a bug - because the first function
(Do__Error__Optional_argument_is_not_a_variable__Error) should produce a
compile-time error "BASIC syntax error. Variable a already defined." on line
"If False Then Dim anArgument as Boolean". An argument declaration is the same
as Dim; and that should be treated the same as

sub Dim2(arg As Boolean)
  if (arg) Then
    Dim a
  else
    Dim a
  end if
end sub

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191207/3cb42516/attachment.html>


More information about the Libreoffice-bugs mailing list