Clarify generic type parameter ordering#2289
Conversation
|
@BHUVANSH855 please do not keep merging main into your branch unless there is an actual merge conflict. |
JelleZijlstra
left a comment
There was a problem hiding this comment.
I think we should add a section header "Type parameter ordering", starting at line 487 or so. Currently this is in a section "Arbitrary generic types as base classes", which isn't really apposite.
|
Also, is this already covered sufficiently in the conformance suite? What are the relevant tests that we have? |
Addressed the requested changes:
There is already conformance coverage for This PR expands the spec wording to make the broader ordering rules explicit, including |
Summary
Clarify how type parameter ordering is determined for generic classes.
This expands the existing wording in the generics spec to explicitly
cover:
Generic[...]base classesProtocol[...]base classesThe updated wording also clarifies that a bare
Protocolbase classdoes not affect type parameter ordering.
Closes #2059