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

Don't leak EvolvingArray out of code flow #49943

Merged
merged 3 commits into from
Jul 19, 2022

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jul 18, 2022

Fixes #49942

(I have no idea what I'm doing in the code flow engine)

}
else if (type.flags & TypeFlags.Union) {
resolveUnionTypeMembers(type as UnionType);
}
else if (type.flags & TypeFlags.Intersection) {
resolveIntersectionTypeMembers(type as IntersectionType);
}
else {
Debug.fail("Unhandled type " + Debug.formatTypeFlags(type.flags));
}
}
return type as ResolvedType;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should assert each of the things that ResolvedType is assuming are defined, but I don't know how expensive that would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash in narrowing when using for-in
4 participants