We should find a way to show the diagnostics happening in template instance at a better location
There is a lot of validation that cannot be represented right now as template constraints and even if we supported most there is probably still some things that are out of control.
model Foo<T> {
@format("uri")
foo: T;
^ error shows up here saying `int32`is not valid for `@format`
}
op test(): Foo<int32>;
We should find a way to show the diagnostics happening in template instance at a better location
There is a lot of validation that cannot be represented right now as template constraints and even if we supported most there is probably still some things that are out of control.
https://cadlplayground.z22.web.core.windows.net/?c=bW9kZWwgRm9vPFQ%2BIHsKICBAZm9ybWF0KCJ1cmkiKQogIGZvbzogVDsKfQoKb3AgdGVzdCgpOsUyaW50MzI%2BOw%3D%3D
Some options could be tracing back to out of the template instance to where the template was instantiated.