Skip to content

False positive: “Redundant boolean comparison” on Boolean default parameter #2

Description

@amancini

Hi,

The following valid Delphi method declaration produces an incorrect hint:

procedure LoadItem(
ForceClear: Boolean = False;
aSelectDate: TDateTime = 0
);

Reported hint:

Redundant boolean comparison at column 64 - drop = True / <> False
(the expression itself is the condition).

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions