Skip to content
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]: @example transitive type check failure #5850

Open
4 tasks done
allenjzhang opened this issue Feb 4, 2025 · 0 comments
Open
4 tasks done

[Bug]: @example transitive type check failure #5850

allenjzhang opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working needs-area

Comments

@allenjzhang
Copy link
Member

Describe the bug

#5835

Looks like transitive type check failed to check against source type

@example(#{
  field: "foo",
})
model X {
  field: string;
}

@example(#{
  ref: "foo",                             <-- Failed to recognize X.field is of type string.
})
model Y {
  ref: X.field;
}

Reproduction

https://typespec.io/playground/?c=QGV4YW1wbGUoI3sKICBmaWVsZDogImZvbyIsCn0pCm1vZGVsIFggyx1zdHJpbmc7Cn0KCs49cmVm0jtZxTvFG1guxULEOg%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%7D

Checklist

@allenjzhang allenjzhang added the bug Something isn't working label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

1 participant