Skip to content

APOS does not error for missing definition of synthesized attribute conditionally assigned #133

Description

@boyland

See simple-binding2.aps: this example has a missing assignment of e.expr_shape in the variable case
(and the attribute has no default value):

  match ?e:Expr=variable(?id:String) begin
    decl : EntityRef;
    decl := lookup(id,e.expr_scope);
    if decl = not_found then
      msgs :> {id ++ " not declared"};
    else
      decl.entity_used :> true;
      e.expr_shape := decl.entity_shape;
    endif;
  end;

This omission should have been detected in analyze.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions