-
Notifications
You must be signed in to change notification settings - Fork 234
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
Allow is and extends of a template parameter #675
Conversation
You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/675/ |
This has the problem still where the error occurs on the template rather than the instantiation: On #423, we said this would be needed for this feature. |
Mind you this is pre-existing for other cases: And another bug, that error doesn't give a good location at all. I'm not sure if we need to gate this change on it, but it adds more pressure to get this right. The experience is really confusing when we don't squiggle the root cause. |
Filed #676 for "another bug" |
I agree the error experience is poor but I don't think this needs to be gated - this pattern will likely be rarely used and but is still quite useful in some cases so I'd rather unblock writing that cadl and fix up the error experience as part of the error elaboration work which, as you say, will improve many other cases besides. But, I can also wait for error elaboration to do this if anyone feels strongly. |
My only real concern is if we're tracking the elaboration work somewhere. I was sort of mentally mapping it to this feature as that's where I remembered discussing it. So I would say this can go in and we should have a distinct elaboration work item. |
@bterlson What do we need to do to get this incorporated or closed? |
I seem to recall that I became less convicned this was a good idea. Let me dig out the rationale as I did a bad job surfacing that info here. |
Elaboration work item: #1321 |
No description provided.