Skip to content

Commit

Permalink
Update src/rule_definition_tools.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
st-- authored Oct 8, 2021
1 parent 3394623 commit ddec127
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rule_definition_tools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,10 @@ and one to use for calling that function
"""
function _split_primal_name(primal_name)
# e.g. f(x, y)
if primal_name isa Symbol ||
Meta.isexpr(primal_name, :(.)) ||
Meta.isexpr(primal_name, :curly)
is_plain = primal_name isa Symbol
is_qualified = Meta.isexpr(primal_name, :(.))
is_parameterized = Meta.isexpr(primal_name, :curly)
if is_plain || is_qualified || is_parameterized
primal_name_sig = :(::$Core.Typeof($primal_name))
return primal_name_sig, primal_name
elseif Meta.isexpr(primal_name, :(::)) # e.g. (::T)(x, y)
Expand Down

0 comments on commit ddec127

Please sign in to comment.