You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When referring to self i.e. the current resource from a method parameter or result then this causes a stack overflow in the type resolver. The issue is caused by not having the resource name cached when we first encounter it and since it's a recursive reference we spin into a stack overflow.
Reproduction
interfacefoo {
resourcea {
constructor() -> a
}
}
Solution
Refactor the resolver to a 2 stage setup:
resolve all the names, check for duplicate or undefined names
expand all the type definitions
This way, during type expansion we already have a reference to the resource and are not infinitely trying to resolve the name.
The text was updated successfully, but these errors were encountered:
When referring to self i.e. the current resource from a method parameter or result then this causes a stack overflow in the type resolver. The issue is caused by not having the resource name cached when we first encounter it and since it's a recursive reference we spin into a stack overflow.
Reproduction
Solution
Refactor the resolver to a 2 stage setup:
This way, during type expansion we already have a reference to the resource and are not infinitely trying to resolve the name.
The text was updated successfully, but these errors were encountered: