diff --git a/ada/ast.py b/ada/ast.py index ca95e43ec..012066644 100644 --- a/ada/ast.py +++ b/ada/ast.py @@ -20586,7 +20586,8 @@ def xref_equation(): 'Has_Tagged_Values', 'Definite', 'Constrained', 'Initialized', 'Valid_Scalars', 'Unconstrained_Array', 'Library_Level', - 'Denorm', 'Signed_Zeros'), + 'Denorm', 'Signed_Zeros', + 'Preelaborable_Initialization'), Entity.prefix.sub_equation & Bind(Self.type_var, Self.bool_type), diff --git a/testsuite/tests/name_resolution/preelaborable_initialization/test.adb b/testsuite/tests/name_resolution/preelaborable_initialization/test.adb new file mode 100644 index 000000000..63c31c9f9 --- /dev/null +++ b/testsuite/tests/name_resolution/preelaborable_initialization/test.adb @@ -0,0 +1,11 @@ +-- Test for the Preelaborable aspect/attribute name resolution + +procedure Test is + type T is new Integer; + + type U is new T with + Preelaborable_Initializaton => T'Preelaborable_Initialization; + pragma Test_Block; +begin + null; +end Test; diff --git a/testsuite/tests/name_resolution/preelaborable_initialization/test.out b/testsuite/tests/name_resolution/preelaborable_initialization/test.out new file mode 100644 index 000000000..87d32de19 --- /dev/null +++ b/testsuite/tests/name_resolution/preelaborable_initialization/test.out @@ -0,0 +1,25 @@ +Analyzing test.adb +################## + +Resolving xrefs for node +******************************************************** + +Expr: + references: None + type: None + expected type: None +Expr: + references: None + type: + expected type: None +Expr: + references: + type: + expected type: None +Expr: + references: None + type: None + expected type: None + + +Done. diff --git a/testsuite/tests/name_resolution/preelaborable_initialization/test.yaml b/testsuite/tests/name_resolution/preelaborable_initialization/test.yaml new file mode 100644 index 000000000..173e325ff --- /dev/null +++ b/testsuite/tests/name_resolution/preelaborable_initialization/test.yaml @@ -0,0 +1,2 @@ +driver: name-resolution +input_sources: [test.adb]