Skip to content

Error on self.x.y.z with explicit self #470

@mrRachar

Description

@mrRachar

There seems to be an error when accessing properties explicitly on self. The issue that appears is (on flintlang/flint master) a fatal error on Optional unwrapping. I'm currently working on the MoveIR branch, and have neatened it up there to give the user more information, but the issue seems to be down to it thinking the type of the property being accessed is an integer, which is disallowed. I'm guessing this gets through earlier stages because it should work. The issue exists, for example, in structs.flint:

// Works
public func setBxx(x: Int) mutates (b) {
  b.x.x = x
}

// Does not work
public func setBxx(x: Int) mutates (b) {
  self.b.x.x = x
}

The issue may be more specific; I'm currently working on other issues so may not get the chance to come back an investigate it thoroughly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions