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
I tried preventing stack overflow, but the 'validity' of type can't be ignored. Especially, Fixer cannot give up fixing types, because it makes validity assertion of a type fail.
Solutions
Solution 1: Allow invalid state
Allowing the constraints of type parameters to be invalid and fixing them each time contraint is used can be a solution, but it does not seem like a good solution.
Solution 2: Use Type::Ref for constraints.
This would make code dirty, but it would be easy to handle infinite recursion because many methods have their own logic to prevent infinite recursions. (fix() does not have way to prevent recursion, and it's the problem)
The text was updated successfully, but these errors were encountered:
Currently, type parameters are incorrectly stored, but when I tried storing them recursively, it resulted in a stack overflow.
https://github.com/swc-project/stc/blob/76e1a7d0c48ea2c9e78e97fba4f32187d31cd625/typescript/file_analyzer/src/analyzer/convert/mod.rs#L120-L131
I tried preventing stack overflow, but the 'validity' of type can't be ignored. Especially,
Fixer
cannot give up fixing types, because it makes validity assertion of a type fail.Solutions
Solution 1: Allow invalid state
Allowing the constraints of type parameters to be invalid and fixing them each time contraint is used can be a solution, but it does not seem like a good solution.
Solution 2: Use
Type::Ref
for constraints.This would make code dirty, but it would be easy to handle infinite recursion because many methods have their own logic to prevent infinite recursions. (
fix()
does not have way to prevent recursion, and it's the problem)The text was updated successfully, but these errors were encountered: