-
Notifications
You must be signed in to change notification settings - Fork 245
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
[Bug]: namespace for template instance #4835
Comments
@timotheeguerin this will block emitter's work on namespace. could you prioritize this? |
@tadelesh I don't think this is unexpected, that operation is still a template and so still belongnig to the previous namespace isn't wrong. Why are are you navigating to this type you really shouldn't ever see it? |
@timotheeguerin the |
the return type having namespace of Template is 100% correct. It is still the template declaration of Goes back to the question why do you even check this this should never be used in regular emitter(TypeSpec ref doc generation would be special case which would want to get the orignal templates declaration). If you are getting this because the user wrote that, yoiu should be filtering types to make sure they are not template declaration if you are not using the semantic navigator which already does that for you |
sorry for some reason thought that Inner was also a templated operation. Still for the model its doesn't make sense ot change the namespec for the operation I guess it probably should |
so, in my example, the return type for both |
and if the |
the operations are not the same because you an
then both of those would be the same op yeah
that wouldn;t change but not sure I understand what you meant |
oh, model property could also ref operations, amazing. i mean for the following tsp, both
|
Yeah |
Describe the bug
currently, the namespace for template operation or model instance will follow the original template instance. but imo, it should follow the interface or operation that contains the operation or model instance.
for this playground example, i want the return type of
test
, theinner
operation in theinner
template and its return type should all have namespace ofUser
.Reproduction
playground
Checklist
The text was updated successfully, but these errors were encountered: