quint
quint copied to clipboard
State variables don't respect module namespaces
Given
module A {
var x: int
}
module B {
var x: int
}
module C {
import A
import B
action step = all {
A::x' = A::x,
B::x' = B::x,
}
}
We get
$ quint typecheck t.qnt
t.qnt:2:3 - error: [QNT202] Multiple updates of variable x
2: var x: int
^^^^^^^^^^
t.qnt:6:3 - error: [QNT202] Multiple updates of variable x
6: var x: int
^^^^^^^^^^
error: typechecking failed
But I would expect these variables to be completely distinct.
On the face of it, this looks to me like an iteration of the general namespacing motif from #1288.
Oh right. My solution considered only instances, but this should also include namespaces. I'm afraid this will be more complicated to fix, tho. We'll figure something out.