diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index f533f2190..380d7706f 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -2580,7 +2580,6 @@ "kind": "recurse_field", "field": "f_iter_expr" }, - "line", { "kind": "recurse_field", "field": "f_iter_filter" @@ -2588,6 +2587,12 @@ ] } ] + }, + "fields": { + "f_iter_filter": [ + "line", + "recurse" + ] } }, "ForLoopStmt": { @@ -5852,4 +5857,4 @@ } }, "max_empty_lines": 1 -} \ No newline at end of file +} diff --git a/testsuite/tests/unparsing/for_loop_stmt/array_init/input.ada b/testsuite/tests/unparsing/for_loop_stmt/array_init/input.ada new file mode 100644 index 000000000..89044f00f --- /dev/null +++ b/testsuite/tests/unparsing/for_loop_stmt/array_init/input.ada @@ -0,0 +1,3 @@ + for I in My_Tasks'Range loop + My_Tasks (I).Start (I); + end loop; diff --git a/testsuite/tests/unparsing/for_loop_stmt/array_init/test.out b/testsuite/tests/unparsing/for_loop_stmt/array_init/test.out new file mode 100644 index 000000000..719b2d9b6 --- /dev/null +++ b/testsuite/tests/unparsing/for_loop_stmt/array_init/test.out @@ -0,0 +1,3 @@ +for I in My_Tasks'Range loop + My_Tasks (I).Start (I); +end loop; diff --git a/testsuite/tests/unparsing/for_loop_stmt/array_init/test.yaml b/testsuite/tests/unparsing/for_loop_stmt/array_init/test.yaml new file mode 100644 index 000000000..b85264fde --- /dev/null +++ b/testsuite/tests/unparsing/for_loop_stmt/array_init/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: stmt +description: | + Test that no line breaks are added. diff --git a/testsuite/tests/unparsing/object_decl/with_composite_constraints/input.ada b/testsuite/tests/unparsing/object_decl/with_composite_constraints/input.ada index 36619a441..3c9ff21c2 100644 --- a/testsuite/tests/unparsing/object_decl/with_composite_constraints/input.ada +++ b/testsuite/tests/unparsing/object_decl/with_composite_constraints/input.ada @@ -1,2 +1 @@ - Max : not null Person_Name := new Person(Sex=>M); - \ No newline at end of file +Max : not null Person_Name := new Person(Sex=>M);