Skip to content

Unification on AST terms looses indices #100

@AZWN

Description

@AZWN

Bug description
When an AST term is bound to a unification variable, it looses its term index.

Versions
Spoofax version: 2.5.16, nightly april 2022.

Steps to reproduce the behavior
Use a constraint as follows

typeOfExp(s, arg) = T :- {ref id}
  arg == Var2Exp(ref),
  astId(ref, id),
  try { false } | note $[Term index: [id]].

Observed behavior
id is a free variable.

Expected behavior
id is bound to a particular term index.

Additional context
Originally found by @toinehartman

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions