Skip to content

Commit 7dd4c48

Browse files
committed
Work around an illegal Ada 2012 construct now spotted by the compiler
The construct is the function call in the return statement of Backward, which is illegal per RM 6.4.1(6.4): In a function call, the accessibility level of the actual object for each explicitly aliased parameter shall not be statically deeper than the accessibility level of the master of the call. The fix would be to make the Self parameter explicitly aliased, but it's a bit painful since the function is overriding. And it's legal in Ada 2022. Issue: eng/toolchain/gnat#1696
1 parent 42f94c2 commit 7dd4c48

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/text/implementation/vss-strings-cursors-iterators-characters.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55
--
66

7+
pragma Ada_2022;
8+
79
package body VSS.Strings.Cursors.Iterators.Characters is
810

911
use type VSS.Implementation.Referrers.Magic_String_Access;

0 commit comments

Comments
 (0)