Skip to content

"Remove needless CLEAR" for attributes within CONSTRUCTOR methods #454

@ConjuringCoffee

Description

@ConjuringCoffee

Hi Jörg-Michael, I would have expected the rule "Remove needless CLEAR" to also work on CLEARs on attributes within the CONSTRUCTOR. Is there any reason why the CLEAR of the following example is not removed?

CLASS zcl_example_clear DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC.

  PUBLIC SECTION.
    METHODS constructor.

  PRIVATE SECTION.
    DATA attribute TYPE i.
ENDCLASS.


CLASS zcl_example_clear IMPLEMENTATION.
  METHOD constructor.
    CLEAR attribute.
  ENDMETHOD.
ENDCLASS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions