Skip to content

Commit

Permalink
Remove the QualExpr.designated_type property
Browse files Browse the repository at this point in the history
  • Loading branch information
thvnx committed May 24, 2024
1 parent 6a157d1 commit 1a55abe
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions ada/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
))

Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 1a55abe

Please sign in to comment.