Skip to content

Failed referential integrity test "Remove needless CLEAR", despite syntactically correct #315

@matthewdjb

Description

@matthewdjb

Error executing rule 'Remove needless CLEAR': Failed referential integrity test on command starting at source line 13!

It's a bit of a pathological example, so I must say that this occurred in a class that I didn't write and I'd never code in this way! I've managed to create a small example to demonstrate the issue.

`REPORT.

class lcl_main DEFINITION.
PUBLIC SECTION.
methods this_fails.
endclass.

CLASS lcl_main IMPLEMENTATION.

METHOD this_fails.
DATA: lo_ctrl TYPE REF TO lcl_main.
CREATE OBJECT lo_ctrl.
FREE: lo_ctrl. CLEAR: lo_ctrl. " <---- Line 13
ENDMETHOD.

ENDCLASS.`

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions