Skip to content

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

@boyland

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.

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