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

mod_rank bug #197

Closed
sallyrobson opened this issue Aug 23, 2023 · 2 comments
Closed

mod_rank bug #197

sallyrobson opened this issue Aug 23, 2023 · 2 comments

Comments

@sallyrobson
Copy link
Member

found some places where we were improperly defining mod_rank which was causing issues in mod order. mod_rank() should dispatch on a type not on a modification itself so the definition should look something like:
mod_rank(::Type{<:CustomMod})

not mod_rank(m::CustomMod)

@Ethan-Russell
Copy link
Member

We don't have any mods that allow you to set their rank as an input, but we may want to do that eventually. If we are requiring that to be in the type, we will have to parameterize the type, as in below:

struct MyCustomMod{R}
    field1
    field2
    function MyCustomMod(field1, field2, rank)
        return new{rank}(field1, field2)
    end
end

@Ethan-Russell
Copy link
Member

This was closed in #198

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

No branches or pull requests

2 participants