Skip to content

transformer: traverse_mut should error if Semantic finds errors #3565

@overlookmotel

Description

@overlookmotel

traverse_mut runs semantic to build scope tree.

If semantic finds errors, transforming should not proceed as the transformer makes the assumption that the AST is valid, and may panic or produce invalid output.

But how should traverse_mut behave if there are errors?

  • Panic?
  • Return a Result?
  • Add errors to transformer's errors vec?

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions