Revisit: Contextually typing classes by their parent class or interface (extends
or implements
)
#52315
Closed
5 tasks done
extends
or implements
)
#52315
Suggestion
π Search Terms
contextually, infer, type, class, extends, inherit, implements
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Since the
satisfies
keyword has been implemented, perhaps the infrastructure is in place to revisit #1373, #3667. The reasons for closing the PR #6118 are no longer valid ifimplements
works more likesatisfies
thanas
. In other words, if it checks assignability to a subtype instead of casting to a subtype, just likesatisfies
does now.π Motivating Example
π» Use Cases
While
implements
currently does type checking, it does not infer types of methods or attributes and you must manually add types to a class declaration.The text was updated successfully, but these errors were encountered: