Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
As per the comment in the SimpleTraits README, negated trait functions must use the same argument
names in order to avoid duplicate definitions:

  > Long story short: define the two methods of a trait and its negation using the same argument
  > names and no warning should be issued.
  • Loading branch information
lassepe committed Apr 5, 2021
1 parent ac7cea1 commit 501e8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viewing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ end
# convert from Cartesian to linear indices if needed
@traitfn _linear(domain::D, inds) where {D; IsGrid{D}} =
vec(LinearIndices(size(domain))[inds])
@traitfn _linear(::D, inds) where {D; !IsGrid{D}} = inds
@traitfn _linear(domain::D, inds) where {D; !IsGrid{D}} = inds

"""
viewindices(domain, geometry)
Expand Down

0 comments on commit 501e8d9

Please # to comment.