Skip to content

Rearrange local declarations leading to syntax error with LIKE LINE OF in structure declaration (regression from issue #64) #495

@REDDERD

Description

@REDDERD

Hello there,

the problem from issue 64 seems to be back. I just updated to 1.24.3, but it already happened to me with at least 1.21. I'm using the default settings for Rearrange local declarations.

The type definition for the structure keeps getting moved beneath its usage in the table type definition, resulting in a syntax error.

The issue should be reproducable with this code.

Before:

  METHOD sample.
    DATA lv_mtart TYPE mtart.

    TYPES: BEGIN OF ty_s_material,
             matnr TYPE matnr,
             mtart LIKE lv_mtart,
           END OF ty_s_material.
           
    DATA lth_material type HASHED TABLE OF ty_s_material WITH UNIQUE KEY matnr.
           
   lth_material = value #( ).
  ENDMETHOD.

After:

  METHOD sample.
    DATA lv_mtart     TYPE mtart.
    DATA lth_material TYPE HASHED TABLE OF ty_s_material WITH UNIQUE KEY matnr.

    TYPES: BEGIN OF ty_s_material,
             matnr TYPE matnr,
             mtart LIKE lv_mtart,
           END OF ty_s_material.

    lth_material = VALUE #( ).
  ENDMETHOD.

Kind regards,
Daniel

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions