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

The name of xRec is not valid. The name of variables and parameters must be suffixed with the type or object name. A (AA0072)) #6181

Closed pri-kise closed 4 years ago

pri-kise commented 4 years ago

Describe the bug This CodeCop is NonSense for Event Subscribers.

To Reproduce Steps and to reproduce the behavior: Create an Event Subscriber like the following

[EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterValidateEvent', 'Description', true, false)]
local procedure GenJnlLineOnAfterValidateEvent(var Rec: Record "Gen. Journal Line"; var xRec: Record "Gen. Journal Line")
begin
end;

Expected behavior There shouldn't be an info or any CodeCop Action, since the subscriber cannot change the signature of an event. Screenshots If applicable, add screenshots to help explain your problem. image

5. Versions:

dzzzb commented 4 years ago

Another one to add to the litany of errors mainly documented in https://github.com/microsoft/AL/issues/6120

This diagnostic should just be turned off until it's anywhere near ready for use. End-users should not have to act as unwitting alpha-testers.

PaulIvan commented 4 years ago

I am closing this issue because it has been resolved, please check the latest developer preview . Please open a new issue if you believe this has not been resolved and reference the current issue.