Skip to content

Commit e2d1c53

Browse files
committed
Merge branch 'mr/limited_fix' into 'edge'
Do not use an access type discriminant for a mutable type See merge request eng/ide/ada_language_server!1648
2 parents f366015 + 11aa92a commit e2d1c53

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

liblsp_base/source/lsp-json_streams.ads

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ with VSS.Text_Streams;
2929
package LSP.JSON_Streams is
3030
-- pragma Elaborate_Body;
3131

32+
type JSON_Reader is access all VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
33+
3234
type JSON_Stream
3335
(Is_Server_Side : Boolean := False;
34-
R : access VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class := null)
36+
R : JSON_Reader := null)
3537
is limited new Ada.Streams.Root_Stream_Type with private;
3638
-- Stream implemented over JSON document
3739
--
@@ -106,7 +108,7 @@ private
106108

107109
type JSON_Stream
108110
(Is_Server_Side : Boolean := False;
109-
R : access VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class := null)
111+
R : JSON_Reader := null)
110112
is limited new Ada.Streams.Root_Stream_Type with
111113
record
112114
W : Write_Stream;

source/client/lsp-clients.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ package body LSP.Clients is
636636
use all type VSS.JSON.Streams.JSON_Stream_Element_Kind;
637637

638638
R : aliased VSS.JSON.Pull_Readers.Simple.JSON_Simple_Pull_Reader;
639-
JS : aliased LSP.JSON_Streams.JSON_Stream (False, R'Access);
639+
JS : aliased LSP.JSON_Streams.JSON_Stream (False, R'Unchecked_Access);
640640

641641
begin
642642
R.Set_Stream (Memory'Unchecked_Access);

0 commit comments

Comments
 (0)