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

replace typeof(x) <: with x isa #2047

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

pepijndevos
Copy link
Contributor

@oscardssmith was telling me there is a lot of this pattern all over SciML, and that the Julia compiler can better reason about isa to allow better inference in if statements and such.

It seems like a fairly mechanical no-brainer accomplished with the following shell command in case this PR becomes stale or you'd like to apply the same change elsewhere.

git ls-files -z | xargs -0 sed -i -e 's/typeof(\([^)]*\)) <:/\1 isa/g'

@ChrisRackauckas ChrisRackauckas merged commit 8f5474a into SciML:master Nov 2, 2023
49 of 55 checks passed
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.

2 participants