Skip to content

Commit

Permalink
Merge branch 'topic/aggregates' into 'master'
Browse files Browse the repository at this point in the history
Fix non qualified aggregate rule

Closes #52

See merge request eng/libadalang/langkit-query-language!162
  • Loading branch information
raph-amiard committed Jan 15, 2024
2 parents 79c99cf + 93cceb9 commit e5e3d44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lkql_jit: lkql

lkql_native_jit: lkql
$(MAVEN) -f lkql/build/java/ install
$(MAVEN) -f lkql_jit/ clean install -P native
$(MAVEN) -f lkql_jit/ clean install -P native,dev

.PHONY: lkql_checker

Expand Down
2 changes: 1 addition & 1 deletion lkql_checker/share/lkql/non_qualified_aggregates.lkql
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
fun non_qualified_aggregates(node) =
node is Aggregate(p_expression_type() is not AnonymousTypeDecl,
p_is_subaggregate() is false,
all parent is not (QualExpr or Aggregate(
all parent is not (QualExpr or AspectClause or Aggregate(
p_expression_type() is not AnonymousTypeDecl)))
4 changes: 4 additions & 0 deletions testsuite/tests/checks/non_qualified_aggregates/aggr.ads
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ package Aggr is
tc : constant Weather := (Date'(26, August, 1974) with 15); -- FLAG
td : Weather := Weather'((Date'(26, August, 1974) with 15)); -- NOFLAG

-- Check that the aggregate inside enum repr clauses cannot be flagged
type En is (Var1, Var2);
for En use (Var1 => 12, Var2 => 15); -- NOFLAG

end Aggr;

0 comments on commit e5e3d44

Please sign in to comment.