Mask @mod(this) for constructors
Opened this issue · 0 comments
lrytz commented
Constructors (almost) always have a @mod(this)
effect, but since this
is known to be fresh (unless there are some other effects), that could be masked:
@pure class C(x: Int) // does not compile
If there are other effects, the @mod(this)
needs to be kept:
class C(@local a: A)
def foo() = {
vla a = new A
val c = new C(a) // should have effect @mod(a, c)
}