DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Create Procedure: Cannot handle Enum value passed as parameter #85

Closed NKarolak closed 3 years ago

NKarolak commented 3 years ago

Sorry if I've overlooked it somehwere:

Create the following code line: MyNewProcedure(Enum::"Sales Document Type"::Order);

and run code action "Create Procedure".

Result:

    local procedure MyNewProcedure(Enum: Enum)
    begin
        Error('Procedure MyNewProcedure not implemented.');
    end;

Expected:

    local procedure MyNewProcedure(SalesDocumentType: Enum "Sales Document Type")
    begin
        Error('Procedure MyNewProcedure not implemented.');
    end;
DavidFeldhoff commented 3 years ago

Hi Natalie, thanks for finding this. As you know, I'm currently developing most of my time for the ATDD TestScriptor, which is why I rarely find time to bring my own extension forward :/ but for this bug, I'll find some time :) I guess it's because of the Enum:: in front of it. Without the Enum:: it should be fine (but that's of course not a solution for the future)

DavidFeldhoff commented 3 years ago

Hi Natalie, the bug is fixed in the develop. I think I'll try to add the "Go to definition of onInsert" topic this evening and then publish both together.

DavidFeldhoff commented 3 years ago

Hi Natalie, I just published the version. Unfortunately the issue was directly closed as I had fix #85 inside the commit message ^^ But I think it's fine? Best regards and again thanks for reporting :)

NKarolak commented 3 years ago

Thank you, confirmed :-)