MVCoconut / coconut.data

Observable Data Layer.
The Unlicense
20 stars 8 forks source link

Argument of custom constructor mess up logic #81

Open kevinresol opened 2 years ago

kevinresol commented 2 years ago

This is an extended problem of #78.

class Issue78Model implements Model {
  @:constant var foo:Int;

  @:computed var bar:Int = foo + 1; // <-- this foo currently references the constructor argument

  public function new(foo:Int) {
        this = { foo: foo + 1 }
    }
}

I think we need a way to somehow restore the reference to class member in proper places...

kevinresol commented 2 years ago

See failing test: https://github.com/MVCoconut/coconut.data/commit/6a88e0589fa75f248683be573c9a25edf04e7013