Skip to content

Conversation

@pjljvandelaar
Copy link
Collaborator

@pjljvandelaar pjljvandelaar commented Apr 25, 2025

Since libadalang 23, the Ada_Type_Decl is no longer an enumeration value of Ada_Node_Kind_Type, but an enumeration range thereof:

  subtype Ada_Type_Decl is Ada_Node_Kind_Type
        range Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl;

This enumeration range includes the following 4 values:

Ada_Anonymous_Type_Decl, Ada_Synth_Anonymous_Type_Decl, Ada_Concrete_Type_Decl, and Ada_Formal_Type_Decl

This change of libadalang results in errors like

extraction-primitive_subps.adb:14:35: error: invalid use of subtype mark in expression or call

This pull request fixes these issues.

Since libadalang 23, the Ada_Type_Decl is no longer an enumeration value of Ada_Node_Kind_Type, but an enumeration range thereof:

      subtype Ada_Type_Decl is Ada_Node_Kind_Type
            range Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl;

This enumeration range includes the following 4 values:

	Ada_Anonymous_Type_Decl, Ada_Synth_Anonymous_Type_Decl, Ada_Concrete_Type_Decl, and Ada_Formal_Type_Decl
@pjljvandelaar
Copy link
Collaborator Author

Solves #5

Still to do - fix "example" - needs rejuvenation-ada 2023 for that!

@jeroenk
Copy link

jeroenk commented Jan 15, 2026

This looks sensible.

After removing the rejuvenation dependency from the tests, and removing all the code from main.adb in the test. I do see errors like the following when extracting a database:

-- ...Dependency_Graph_Extractor-Ada/tests/syntax_examples/src/operator_subprogram_calls.adb --
Encountered Libadalang problem: Property Name.relative_name not implemented on type SyntheticIdentifier
Str[21:71-21:74]: "<"
Encountered Libadalang problem: Property Name.relative_name not implemented on type SyntheticIdentifier
Str[39:71-39:75]: "<="

Is that a regression in libadalang 23, or is that a problem with extractor?

@pjljvandelaar
Copy link
Collaborator Author

Is that a regression in libadalang 23, or is that a problem with extractor?

Good question: to be investigated (when time permits ;-( )

@jeroenk
Copy link

jeroenk commented Jan 16, 2026

I forgot the details, but you might remember: can we assume that if a class (say the Name class) has a certain property (P_...) that the property is also implemented for all its subclasses (SyntheticIdentifier in this case)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants