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

Automatically impl interface fields #53

Closed
Zaba505 opened this issue May 4, 2020 · 0 comments · Fixed by #60
Closed

Automatically impl interface fields #53

Zaba505 opened this issue May 4, 2020 · 0 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request

Comments

@Zaba505
Copy link
Collaborator

Zaba505 commented May 4, 2020

If an object implements an interface the user shouldn't have to explicitly add the interface fields to the object. Currently, the implementation mandates this:

interface Iterator {
  next: String
}

type Sentence implements Iterator {
  # next field must be specified
  next: String

  # Now Sentence specific fields
  verbs: [String]
}

The desired usage would look like this:

interface Iterator {
  next: String
}

type Sentence implements Iterator {
  # next field is implied
  # Thus, you can just have sentence specific fields
  verbs: [String]
}
@Zaba505 Zaba505 added the enhancement New feature or request label May 4, 2020
@Zaba505 Zaba505 self-assigned this May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant