-
Notifications
You must be signed in to change notification settings - Fork 268
resolve default template parameters from parent containers #6938
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
base: main
Are you sure you want to change the base?
Conversation
All changed packages have been documented.
Show changes
|
@@ -4316,9 +4330,6 @@ export function createChecker(program: Program, resolver: NameResolver): Checker | |||
type.name, | |||
SymbolFlags.Interface | SymbolFlags.LateBound, | |||
); | |||
if (isTemplateInstance(type) && type.name === "Foo") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
You can try these changes here
|
Hey @chrisradek , thanks for the fix. I still encounter the error with this case: interface A<T = {}> {
op foo<R = T, P = R>(params: P): R;
}
op MyOp is A.foo; I'd expect that since all of the parameters are defined (
|
@steverice Thanks for bringing that up! This was a scenario I had in mind but clearly missed - working on a fix! |
Meant to partially address #6745
The
extends
case still acts oddly (and may be fixed when #6699 is fixed).This case still won't produce any output:
Because even though all the
Resource
template parameters are provided in theextends
, the operation inFooResource
does not get instantiated. I'm not 100% convinced this case is a bug though.