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

Non working property syntax #812

Closed
simonmika opened this issue Sep 1, 2014 · 2 comments
Closed

Non working property syntax #812

simonmika opened this issue Sep 1, 2014 · 2 comments
Milestone

Comments

@simonmika
Copy link

@simonmika simonmika commented Sep 1, 2014

The following syntax for properties (as described here):

Tree: class {
  age: Int {}
  test: func -> Int {
    age
  }
}

Results in the following error message for the body of the test method:

error No such function __getage__() for `Tree`
        age
        ~~~

But the following works:

Tree: class {
  age: Int { get set }
  test: func -> Int {
    age
  }
}

Is it an deprecated syntax (it is not described on the ooc webpage) or is something else wrong?

@alexnask
Copy link
Collaborator

@alexnask alexnask commented Sep 9, 2014

This may be a bug indeed, I don't remember seeing any code using the {} syntax though.
@fasterthanlime, do we want this or not?

Loading

@fasterthanlime
Copy link
Collaborator

@fasterthanlime fasterthanlime commented Sep 9, 2014

Better fix the doc, { get set } is the standard way for now.

On Tue, Sep 9, 2014 at 5:50 PM, Alexandros Naskos notifications@github.com
wrote:

This may be a bug indeed, I don't remember seeing any code using the {}
syntax though.

@fasterthanlime https://github.com/fasterthanlime, do we want this or
not?


Reply to this email directly or view it on GitHub
#812 (comment).

Loading

@alexnask alexnask closed this Sep 19, 2014
@fasterthanlime fasterthanlime added this to the 0.9.10 milestone Jul 10, 2015
@fasterthanlime fasterthanlime added this to the 0.9.10 milestone Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants