larshp / abapOpenChecks

Open source checks for SAP Code Inspector / ABAP Test Cockpit
https://docs.abapopenchecks.org
MIT License
270 stars 79 forks source link

Check 059 - Logical expression structure - NOT INSTANCE OF - abapOpenChecks boolean parser error #1051

Closed pcf0 closed 3 years ago

pcf0 commented 3 years ago

This valid code leads to abapOpenChecks boolean parser error:

report y_test.

class lcl_program definition final.
  public section.
    methods:
      main.
endclass.

class lcl_program implementation.
  method main.
    if me is not instance of lcl_program.
      write: / 'NOK'.
    else.
      write: / 'OK'.
    endif.
  endmethod.
endclass.

start-of-selection.
  new lcl_program( )->main( ).

The problem is the is not instance of. If I use is instance of, there is no error.