Closed robdaemon closed 1 year ago
I'm able to reproduce this with the next code:
with Ada.Containers.Indefinite_Ordered_Maps;
package Main is
package Source_Expected_Map is new Ada.Containers.Indefinite_Ordered_Maps
(Key_Type => String,
Element_Type => Integer,
"=" => "=");
Map :
Source_Expected_Map.Map :=
["d.",
1];
end Main;
We will fix that. Thank you!
@robdaemon this issue is now fixed in the master branch of libadalang-tools which contains the formatter used by ALS. It will be available in the next release of the ALS VSCode extension. Thank you for reporting and for the reproducer.
Using the VSCode plugin v23.0.14, I get a failure of ALS during formatting code utilizing a container aggregate.
Snippet of the container:
And the code that attempts to get formatted and fails:
This code is somewhat contrived, but it's copied from my source file that is failing to format. The compiler doesn't have issues with this container aggregate with
-gnat2022
The error in the VSCode output window is:
If you use
(
and)
instead of[
and]
for the aggregate, ALS formats the file, but the compiler sayscontainer aggregate must use [], not ()