metaborg / nabl

Spoofax' Name Binding Language
Apache License 2.0
7 stars 12 forks source link

Permissions lost when scope is used in non-linear pattern #78

Open AZWN opened 2 years ago

AZWN commented 2 years ago

Bug description Scope permissions are lost when a scope is used in a non-linear pattern.

Steps to reproduce the behavior

Open the following test:

resolve {s1 s2}
  new s1,
  prgmOk(s1) == s2

signature
  relations
    rel:

rules

  prgmOk: scope -> scope
  prgmOk(s) = s :-
    !rel[] in s.

Observed behavior There is an permission error on prgmOk(s1) == s2.

Expected behavior No error, because s1 is owned.

Additional context

Perhaps introduced by https://github.com/metaborg/nabl/commit/e67871d224d2fcb5fe08b5f5bdf48fdaa259757b