[Libreoffice-bugs] [Bug 142460] New: Type of result of comparison of literals in Basic must be Boolean, not Integer

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon May 24 11:33:14 UTC 2021


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

            Bug ID: 142460
           Summary: Type of result of comparison of literals in Basic must
                    be Boolean, not Integer
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: difficultyBeginner, easyHack, skillCpp
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

This basic code:

  msgbox TypeName(1<2)
  msgbox TypeName("A"<"Z")
  A = "A"
  Z = "Z"
  msgbox TypeName(A < Z)

returns "Integer" in the first two case, and "Boolean" in the last one. The
result type for comparison, when using literals, must be Boolean, as when
comparing variables.

Code pointer: same as in tdf#142180 - see SbiExprNode::FoldConstantsBinaryNode
in basic/source/comp/exprnode.cxx.

The fix must include a unit test.
Please CC me to your gerrit change, so that I could help and review.

-- 
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/20210524/4cb0492e/attachment.htm>


More information about the Libreoffice-bugs mailing list