Skip to content

Commit

Permalink
SubtypeDecl.get_type: add missing default value for "origin"
Browse files Browse the repository at this point in the history
This is for consistency with the overriden property. Langkit used not to
detect this inconsistency.
  • Loading branch information
pmderodat committed May 13, 2024
1 parent 8cb2a4a commit 772b6ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ada/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -10141,7 +10141,10 @@ class SubtypeDecl(BaseSubtypeDecl):
add_to_env(Entity.synthetic_object_decl_env_assoc)
)

@langkit_property(return_type=T.BaseTypeDecl.entity, dynamic_vars=[origin])
@langkit_property(
return_type=T.BaseTypeDecl.entity,
dynamic_vars=[default_origin()],
)
def get_type():
return Entity.subtype.designated_type.match(
lambda st=T.SubtypeDecl: st.get_type,
Expand Down

0 comments on commit 772b6ce

Please sign in to comment.