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

Improve inference for some regex captures #41666

Merged
merged 2 commits into from
Jul 22, 2021

Conversation

jakobnissen
Copy link
Contributor

Add some typeasserts to places where an element of a m.captures is loaded, and it's known that it's a match. This prevents useless union-splitting, which shows up in static analysis.

There are more places in Base where the same pattern of m.captures[1] occurs, but many of these are in places where it's unlikely people are hitting them doing static analysis, such as in TerminalMenus, InteractiveUtils, Markdown and so on.

base/irrationals.jl Outdated Show resolved Hide resolved
@aviatesk aviatesk merged commit f540b9c into JuliaLang:master Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants