-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
MutableList.scala has two local fields which alias each other, similar to the following:
class Counter {
private var x = 0
def inc(): Int @pure @mod(this) = { x += 1; x }
}
class MUHA {
@local var firstC = new Counter
@local var lastC = firstC
def f(): Counter @loc(this) = {
lastC
}
}
the above should work. the below should not:
class MUHA {
var firstC = new Counter // non-local
@local var lastC = firstC // should fail
def f(): Counter @loc(this) = {
lastC
}
}
Reactions are currently unavailable