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
719 stars 242 forks source link

Incorrect Symbol Info shown in VS Code for Enum Values #7689

Closed wweidl closed 2 months ago

wweidl commented 3 months ago

Please include the following with each issue:

1. Describe the bug When hovering over a TableRelation / Calculation Formula where Enum Values with Names of Base Application Tables are used in a const Expression in the VS Code Editor the AL Extension shows the incorrect Symbol Info - instead of the Enum Value the Base Application Table Info is shown.

2. To Reproduce

  1. Create a new Project with AL:GO for Version 12, download Symbols
  2. Create an .al File with the following Content:
table 50100 TestTable
{
    fields
    {
        field(1; Type; enum "Sales Line Type")
        {
            Caption = 'Type';
        }
        field(2; "No."; Code[20])
        {
            Caption = 'No.';
            TableRelation = if (Type = const(Item)) Item else if (Type = const("Charge (Item)")) "Item Charge";
        }
    }
}
  1. Move the Mouse Cursor over the Word Item in the Table Relation Line and a Info Window should open with Infos about the Table Item instead of the Enum Value Item in the "Sales Line Type" Enum Type.

3. Expected behavior The System shows an Info about the Enum Value on hovering over the Item: image

4. Actual behavior

image

5. Versions:

BazookaMusic commented 3 months ago

Looks like a bug with the semantic lookup

JesperSchulz commented 2 months ago

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.18370.0 and VS Code Extension Version 14.0.985779.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/