-
Notifications
You must be signed in to change notification settings - Fork 225
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
Fix stack overflow when model properties reference itself #2375
Fix stack overflow when model properties reference itself #2375
Conversation
Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status): Website: https://cadlwebsite.z1.web.core.windows.net/prs/2375/ |
@@ -811,6 +811,12 @@ const diagnostics = { | |||
default: paramMessage`Alias type '${"typeName"}' recursively references itself.`, | |||
}, | |||
}, | |||
"circular-prop": { |
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.
Could it be circular-property-reference
?
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.
I kept the same naming style as the other circular reference errors
},
"circular-base-type": {
severity: "error",
messages: {
default: paramMessage`Type '${"typeName"}' recursively references itself as a base type.`,
},
},
"circular-op-signature": {
severity: "error",
messages: {
default: paramMessage`Operation '${"typeName"}' recursively references itself.`,
},
},
"circular-alias-type": {
severity: "error",
messages: {
default: paramMessage`Alias type '${"typeName"}' recursively references itself.`,
},
},
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.
OK, cool
fix #1741