Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

like ref to val (val generic typed), expect syntax error #3231

Open
oblomov-dev opened this issue Feb 8, 2024 · 1 comment
Open

like ref to val (val generic typed), expect syntax error #3231

oblomov-dev opened this issue Feb 8, 2024 · 1 comment
Labels

Comments

@oblomov-dev
Copy link

Abaplint is not showing a syntax error in this situation:

    METHODS my_method
      IMPORTING
        !val          TYPE data.
METHOD my_method.
   DATA lr_data LIKE REF TO val.
ENDMETHOD.

Found this here after installing on an abap system:
https://github.com/abap2UI5/abap2UI5-downport/blob/cdccb5a64b2f0eecb271cfe33f3ed0411b4e0d3b/src/01/02/z2ui5_cl_core_app.clas.abap#L164

Or here (maybe the same issue):

    METHODS my_method
      IMPORTING
        !tab           TYPE STANDARD TABLE OPTIONAL.
METHOD my_method.
    DATA lr_tab LIKE REF TO tab.
ENDMETHOD.

Found this here after installing on an abap system:
https://github.com/abap2UI5/abap2UI5-downport/blob/cdccb5a64b2f0eecb271cfe33f3ed0411b4e0d3b/src/01/02/z2ui5_cl_core_client.clas.abap#L242

Additionally this code is generated by the downporter, so its also a bug there, but not sure wether fixing the downporter is worth it, because i can fix this easily also on the main codeline. It's a bit similar to this issues:
#2946

@larshp larshp added the bug label Feb 8, 2024
@larshp
Copy link
Member

larshp commented Feb 9, 2024

reproduced as

CLASS lcl DEFINITION.
  PUBLIC SECTION.
    METHODS my_method
      IMPORTING
        !val TYPE data.
ENDCLASS.

CLASS lcl IMPLEMENTATION.
  METHOD my_method.
    DATA lr_data LIKE REF TO val.
  ENDMETHOD.
ENDCLASS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants