microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
744 stars 245 forks source link

'in' statement overflow warning CodeCop #5731

Closed prakalovic closed 4 years ago

prakalovic commented 4 years ago

Describe the bug There is CodeCop analyzer overflow warning when using "in" statement with different Texts

Steps and to reproduce the behavior: AL Language Version 4.0.229715

  1. Enable CodeCop analyzer
  2. Use the following code image
qutreson commented 4 years ago

I can reproduce this issue with the latest developer preview:

    local procedure MyProcedure()
    var
        varText50: Text[50];
        varText100: Text[100];
        varText: Text;
    begin
        if varText50 in [varText100, varText] then;
    end;
qutreson commented 4 years ago

This issue should be fixed in our latest developer previews.