-
Notifications
You must be signed in to change notification settings - Fork 9
Inheritance of symbols from parent to child #23
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
Comments
|
But without redeclaring anything would the child protocol copy the symbols from the parent? It seems natural to assume that this works because of the protocol A { a; }
protocol B extends A { b; }
class C implements B {
[B.a]() {} // copy A.a to B.a
[B.b]() {}
} |
@thejameskyle It would not copy the symbols. I can see how someone might make that assumption, but the relationship implied between |
I think another keyword would be a lot clearer. A synonym of "requires" rather than something that implies inheritance would be best I think |
I think I would be surprised if the keyword was "extends" and it did not set up a [[Prototype]] chain. |
protocol A { a; }
protocol B depends on A { b; } or, to align with #24 protocol A { a; }
protocol B requires A { b; } |
👍 for |
I have some questions about this example:
In this example, implementing
B
seems to require referencing A. I was wondering if it made sense to copy over the properties of A to B:If not, does that mean that
B
can also have it's own symbol nameda
?Or should that be an early error?
The text was updated successfully, but these errors were encountered: