You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
codeunit50100 "Inlay"
{
localprocedure PurchShipmentToJson(var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var WarehouseShipmentLine: Record "Warehouse Shipment Line") RequestJson: JsonObjectvar
PurchaseHeader: Record "Purchase Header";
Vendor: Record Vendor;
FormatAddress: Codeunit "Format Address";
AddressArray: array[8] ofText[100];
begin
PurchaseHeader.Get(WarehouseShipmentLine."Source Subtype", WarehouseShipmentLine."Source No.");
FormatAddress.PurchHeaderBuyFrom(AddressArray, PurchaseHeader);
Vendor.Get(PurchaseHeader."Buy-from Vendor No.");
Vendor.TestField("VAT Registration No.");
end;
}
Press and hold Ctrl+Alt to trigger inlay hints.
3. Expected behavior
Inlay hints for parameters are shown
4. Actual behavior
Inlay hints are not shown and outup contains the following error message
[Error - 11:45:14 AM] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/inlayHint' failed with error: 'Object reference not set to an instance of an object.'
Details:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.Nav.CodeAnalysis.SymbolDisplayVisitor.GetRecordStructure(Symbol symbol) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\SymbolDisplay\SymbolDisplayVisitor.cs:line 1493
at Microsoft.Dynamics.Nav.CodeAnalysis.SymbolDisplayVisitor.VisitParameter(ParameterSymbol symbol) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\SymbolDisplay\SymbolDisplayVisitor.cs:line 273
at Microsoft.Dynamics.Nav.CodeAnalysis.SymbolDisplay.ToDisplayParts(ISymbol symbol, SemanticModel semanticModelOpt, Int32 positionOpt, SymbolDisplayFormat format, Boolean minimal) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\SymbolDisplay\SymbolDisplay.cs:line 103
at Microsoft.Dynamics.Nav.CodeAnalysis.Symbols.Symbol.ToDisplayString(SymbolDisplayFormat format, SemanticModel semanticModel) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Symbols\Symbol.cs:line 529
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.InlayHintRequestHandler.GetInlayHints(Document document, Nullable`1 range, CancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.InlayHintRequestHandler.HandleAsync(InlayHintRequest request, Int32 requestId, CancellationToken cancellationToken) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\InlayHintRequestHandler.cs:line 46
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 84
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 84
5. Versions:
AL Language: 14.2.1249978
Visual Studio Code: 1.97.2
Business Central: 25.2
List of Visual Studio Code extensions that you have installed: AL only
Operating System:
Windows: Windows 11 (23H2)
Internal work item: AB#566075
The text was updated successfully, but these errors were encountered:
1. Describe the bug
InlayHins doesn't show up.
Object reference not set to an instance of an object
error is posted in the output of AL.2. To Reproduce
Enable InlayHints for AL in vscode
Create a codeunit file with following content
Press and hold Ctrl+Alt to trigger inlay hints.
3. Expected behavior
Inlay hints for parameters are shown
4. Actual behavior
Inlay hints are not shown and outup contains the following error message
5. Versions:
Internal work item: AB#566075
The text was updated successfully, but these errors were encountered: