Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrRachar opened this issue Aug 23, 2019 · 0 comments
Open

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

mrRachar opened this issue Aug 23, 2019 · 0 comments
Labels

Comments

@mrRachar
Copy link
Collaborator

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.

@mrRachar mrRachar added the bug label Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant