-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2211: Fix type piracy r=charleskawczynski a=charleskawczynski This PR: - Removes overloading of Fields on Integers (which is type piracy, and results in invalidations) - Applies the minimalistic fixes by interpolating integers into getproperty calls. As a compromise, this PR only removes `getindex` on `Field`s and `Integer`s: ```julia Base.`@propagate_inbounds` Base.getindex(field::FDFields, i::Integer) = Base.getproperty(field, i) ``` Which is the worst of the type pirated methods. The next will be for `Base.getindex(field::FaceFields, i::CCO.PlusHalf)` and `Base.setindex!(field::FaceFields, v, i::CCO.PlusHalf)`, however, that requires adding `Spaces.level` and such to a lot of places, which is just a bit more work. Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
- Loading branch information
Showing
4 changed files
with
184 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.