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

Root init method and node var #29

Closed
bolismauro opened this issue Nov 2, 2016 · 1 comment
Closed

Root init method and node var #29

bolismauro opened this issue Nov 2, 2016 · 1 comment
Assignees

Comments

@bolismauro
Copy link
Contributor

The Root class has the following code

  public var node: AnyNode? {
    willSet(node) {
      if self.node != nil {
        fatalError("node cannot be changed")
      }
    }
  }

wouldn't be better to update the init to take the node, and make it readonly (let)?

@smaramba
Copy link
Contributor

smaramba commented Nov 3, 2016

yes to me. You can still implement the .makeRoot using the new init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants