metaborg / stratego

Apache License 2.0
10 stars 6 forks source link

Unexpected behaviour: equality of term arguments #25

Open toinehartman opened 2 years ago

toinehartman commented 2 years ago

I would expect that the following program evaluates to "not equal". However, it evaluates to "equal".

module eq-term-args

strategies
  s(|x, x) = !"equal"
  s(|x, y) = !"not equal"

main = s(|1, 2)

This is caused by the fact that the two occurrences of x in the first strategy instance are desugared to unique names; therefore, the implied equality constraint is lost.

This PR adds a failing test that showcases the unexpected behavior.