diff --git a/liblsp_base/source/lsp-json_streams.ads b/liblsp_base/source/lsp-json_streams.ads index bdc8815e5..db780c815 100644 --- a/liblsp_base/source/lsp-json_streams.ads +++ b/liblsp_base/source/lsp-json_streams.ads @@ -29,9 +29,11 @@ with VSS.Text_Streams; package LSP.JSON_Streams is -- pragma Elaborate_Body; + type JSON_Reader is access all VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class; + type JSON_Stream (Is_Server_Side : Boolean := False; - R : access VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class := null) + R : JSON_Reader := null) is limited new Ada.Streams.Root_Stream_Type with private; -- Stream implemented over JSON document -- @@ -106,7 +108,7 @@ private type JSON_Stream (Is_Server_Side : Boolean := False; - R : access VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class := null) + R : JSON_Reader := null) is limited new Ada.Streams.Root_Stream_Type with record W : Write_Stream; diff --git a/source/client/lsp-clients.adb b/source/client/lsp-clients.adb index 8ede68d7d..2c6cdfd33 100644 --- a/source/client/lsp-clients.adb +++ b/source/client/lsp-clients.adb @@ -636,7 +636,7 @@ package body LSP.Clients is use all type VSS.JSON.Streams.JSON_Stream_Element_Kind; R : aliased VSS.JSON.Pull_Readers.Simple.JSON_Simple_Pull_Reader; - JS : aliased LSP.JSON_Streams.JSON_Stream (False, R'Access); + JS : aliased LSP.JSON_Streams.JSON_Stream (False, R'Unchecked_Access); begin R.Set_Stream (Memory'Unchecked_Access);