Skip to content

Commit

Permalink
V908-033: Simplify expr_type for NumberDecls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roldak committed Sep 13, 2022
1 parent 3e43e7b commit 02b2dbf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ada/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -10155,15 +10155,7 @@ class NumberDecl(BasicDecl):

@langkit_property(call_memoizable=True)
def expr_type():
p = Var(If(Self.expr.type_val.is_null,
Entity.expr.resolve_names,
True))

typ = Var(If(p,
Self.expr.type_val.cast_or_raise(BaseTypeDecl.entity),
No(BaseTypeDecl.entity)))

return If(typ.is_int_type,
return If(Entity.expr.expression_type.is_int_type,
Self.universal_int_type,
Self.universal_real_type).cast(BaseTypeDecl.entity)

Expand Down

0 comments on commit 02b2dbf

Please sign in to comment.