===============================
LIBADALANG 25 NEW FEATURES LIST
===============================

Copyright (C) 2026, AdaCore

This file contains a complete list of new features in version 25.
A full description of all features can be found in LIBADALANG documentation.

An ISO date (YYYY-MM-DD) appears in parentheses after the description line.
This date shows the implementation date of the feature. Any 25.0w wavefront
subsequent to this date will contain the indicated feature, as will any
subsequent 25 or later release.

NF-19861 Name resolution support for AI12-0086-1 (2025-02-24)

  Libadalang now succesfully resolves occurrences of the Ada 2022
  feature documented in AI12-0086-1, which allows using a nonstatic
  expression in an aggregate to initialize a discriminant of a
  variant record, as long as the subtype of this expression only
  allows a single variant.

NF-19771 Optimize logic for determining ghost code (2025-03-24)

  This change optimizes the number and the nature of the queries
  performed internally by Libadalang to determine whether a given
  statement is ghost code or not. In particular, for a call to a
  procedure declared in a specification unit, determining whether
  the call is ghost or not will never trigger parsing and analysis
  of its corresponding body unit, whereas it previously did. Hence,
  performance and memory footprint are both improved.

NF-19675 Support user-defined indexing after implicit deref (2024-12-13)

  This change improves name resolution support for user-defined
  indexing, in particular to handle the case where the indexing
  occurs immediately after an implicit dereference.

NF-19672 Adjust visibility in renaming clauses (2024-08-23)

  This change improves name resolution of subprogram renamings to handle
  the following case:

  package Test is
     package Int is
        function Bar (X : Integer) return Integer is (X);
     end Int;

     function Foo (Int : Integer) return Integer renames Int.Bar;
  end Test;

  In particular, the parameter Int should not hide the package Int
  when resolving Int.Bar.

NF-19671 Name resolution for the `Subprogram_Variant` aspect (2024-08-20)

  This change adds name resolution support for the
  `Subprogram_Variant` aspect, meaning that navigation will now work
  correctly inside the expressions in the right hand side of the
  `Increases`, `Decreases` and `Structural` associations.

NF-19670 Add the `get_annotations` property (2024-06-21)

  This property returns all the `Annotate` aspects defined on the
  given entity, both through pragmas and aspect specifications. For
  a type declaration, it also includes all annotations defined on
  its base type, when relevant (the field ``inherited`` will be set
  for those).

NF-19669 Make `DefiningName.basic_decl` skip internal nodes (2024-06-03)

  When called on a defining name of a generic package, this property
  used to return the `GenericPackageInternal` node, since it is its
  closest parent `BasicDecl` node. However, as we want to avoid
  returning such internal nodes to users, this change makes it so
  that the `GenericPackageDecl` node is returned instead. Likewise
  for generic subprograms.

NF-19668 Make `designated_generic_decl` return `GenericDecl` (2024-04-03)

  The return type of this property used to be `BasicDecl`, whereas
  we know in practice that it can only return `GenericDecl` nodes.
  This change modifies the return type accordingly.

NF-19667 SPARK-related properties moved to `AdaNode` (2024-03-07)

  This change moves the `has_spark_mode_on` and
  `is_subject_to_proof` properties from `SubpBody` nodes to
  `AdaNode`, so that they are callable on all kinds of nodes. This
  was done because subprogram bodies are not the only entities for
  which we may want to retrieve this information (consider, for
  example, tasks).

NF-19666 Rename the `p_subtype_constraints` property (2024-03-18)

  The name of this property gave the impression that it would work
  on all kind of subtypes, whereas in reality it focuses on
  discrimant constraints (hence the return type being an array of
  parameter/actual pair). This property is now named
  `p_discriminant_constraints`. Also see the newly added
  `p_subtype_constraint` property.

NF-19664 Property to retrieve the constraint of a subtype (2024-03-18)

  This change introduces the property p_subtype_constraint on
  TypeExpr nodes, which returns -- if present -- the constraint applied
  to the type designated by this type expression. Consider for example the
  following snippet:

  subtype My_Nat is Integer range 0 .. 255;
  X : My_Nat;

  In that case, calling p_subtype_constraint on the type expression in
  the declaration of object X will return a RangeConstraint node
  corresponding to the range 0 .. 255 constraint.

NF-19464 Expression defaults in generic formal functions (2024-04-18)

  Support has been added for the GNAT experimental feature
  "Expression defaults in generic formal functions". See the GNAT RM
  for more details.

NF-19453 Add support for deep delta aggregates (2024-07-31)

  Libadalang now supports GNAT's experimental feature of deep delta
  aggregates.

NF-19366 Documentation for nodes now lists derived nodes (2024-06-07)

  For all supported APIs, the documentation of all node types now
  includes the list of all directly derived nodes, with hyperlinks
  to the derived nodes.

NF-19193 A new kind of call supported by CallExpr.P_Kind (2024-04-03)

  CallExpr.P_Kind can now be called on an entry indexing. P_Kind
  will return the Family_Index kind in that case.

NF-19112 New optional parameter for `P_Has_Aspect` property (2024-02-28)

  The `P_Has_Aspect` property now takes an optional boolean
  parameter: `Previous_Parts_Only`. By default, the property will
  check for the given aspect on all parts of the declaration (even
  private ones). By setting `Previous_Parts_Only` to `True`, only
  previous parts are considered for aspect checking.

NF-19101 New optional parameter for `P_Get_Aspect` property (2024-02-22)

  The `P_Get_Aspect` property now takes a new optional parameter. By
  default, the `P_Get_Aspect` property checks for a given aspect
  (either specified by an aspect specification, a pragma, or a
  representation clause) on all the parts of a declaration, even the
  private ones. By setting `Previous_Parts_Only` to `True`, only
  previous parts (i.e. visible parts) are considered in order to
  comply with visibility rules.
