From 1a55abe2202a09f0a027975982fca6792c267c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Th=C3=A9venoux?= Date: Fri, 24 May 2024 15:45:38 +0200 Subject: [PATCH] Remove the QualExpr.designated_type property --- ada/ast.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ada/ast.py b/ada/ast.py index 7ec370ea1..4afd26d01 100644 --- a/ada/ast.py +++ b/ada/ast.py @@ -20738,7 +20738,7 @@ def get_allocated_type(): """ return origin.bind(Self.origin_node, Entity.type_or_expr.match( lambda t=SubtypeIndication.entity: t.designated_type, - lambda q=QualExpr.entity: q.designated_type, + lambda q=QualExpr.entity: q.prefix.name_designated_type, lambda _: No(BaseTypeDecl.entity) )) @@ -20807,18 +20807,9 @@ def xref_equation(): ) ) - # TODO: once we manage to turn prefix into a subtype indication, remove - # this property and update Allocator.get_allocated type to do: - # q.prefix.designated_type. - designated_type = Property( - env.bind(Entity.node_env, - origin.bind(Self.origin_node, - Entity.prefix.designated_type_impl)), - ) - @langkit_property() def designated_env(): - return Entity.designated_type.defining_env + return Entity.prefix.name_designated_type.defining_env @langkit_property() def env_elements_impl():