Skip to content

Mask @mod(this) for constructors #21

Description

@lrytz

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)
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions