File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
testsuite/tests/checks/one_construct_per_line Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ fun one_construct_per_line(node) =
5353 | ExtendedReturnStmtObjectDecl
5454 | NamedStmtDecl
5555 | AcceptStmtBody
56+ # Ignore generic package instantiations when they are in a generic formal
57+ | GenericPackageInstantiation(parent: GenericFormal)
5658 ) and (
5759 node.token_end().end_line == stdlib.next_non_blank_token_line(node.token_end())
5860 or node.token_start().start_line == stdlib.previous_non_blank_token_line(node.token_start())
Original file line number Diff line number Diff line change @@ -4,6 +4,17 @@ package Line is I : Integer; -- FLAG
44 F2 : Float; C : -- FLAG (2)
55 Character;
66
7+ generic
8+ type Data_Type is private ;
9+ package Pkg_A is
10+ end Pkg_A ;
11+
12+ generic
13+ with package Data_Pkg is new Pkg_A (<>); -- NOFLAG
14+ with procedure Test (X : Integer) is <>; -- NOFLAG
15+ package Pkg_B is
16+ end Pkg_B ;
17+
718 type T (A : Integer; B : Integer) is null record ; -- NOFLAG
819
920 procedure Proc (I : in out Integer); end Line ; -- FLAG
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ line.ads:4:16: rule violation: more than one construct on the same line
10104 | F2 : Float; C : -- FLAG (2)
1111 | ^
1212
13- line.ads:9 :14: rule violation: more than one construct on the same line
14- 9 | procedure Proc (I : in out Integer); end Line; -- FLAG
15- | ^^^^
13+ line.ads:20 :14: rule violation: more than one construct on the same line
14+ 20 | procedure Proc (I : in out Integer); end Line; -- FLAG
15+ | ^^^^
1616
1717line.adb:20:50: rule violation: more than one construct on the same line
181820 | accept Start (I : Integer; B : Boolean) do null; -- FLAG
You can’t perform that action at this time.
0 commit comments