Component members are discovered within the context of some declaration associated with a single AST node. If that declaration has free type parameters, then asking the type checker for that declaration's AST node's type will return a type that still contains those free type parameters. Further, different choices for those type parameters in descendant component declarations may cause the type of the member to vary.
To allow a member to return its type with all type arguments substituted, members' type functions can now optionally be passed a component declaration that (inclusively) descends from the member's declaration. The type returned will be the type of this member for an instance of the given declaration.
Component members are discovered within the context of some declaration associated with a single AST node. If that declaration has free type parameters, then asking the type checker for that declaration's AST node's type will return a type that still contains those free type parameters. Further, different choices for those type parameters in descendant component declarations may cause the type of the member to vary.
To allow a member to return its type with all type arguments substituted, members'
type
functions can now optionally be passed a component declaration that (inclusively) descends from the member's declaration. The type returned will be the type of this member for an instance of the given declaration.