Skip to content

Commit

Permalink
switch to static_method_count
Browse files Browse the repository at this point in the history
  • Loading branch information
mrufsvold committed May 31, 2024
1 parent 3509752 commit 16b18bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DuckDispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end
using TestItems: @testitem
using SumTypes: @sum_type, @cases
using ExproniconLite: JLFunction, JLStruct, is_function, codegen_ast
using Tricks: static_fieldtypes, static_methods, static_hasmethod
using Tricks: static_fieldtypes, static_hasmethod, static_method_count

include("Utils.jl")
include("Types.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ end
replaced = replace_this(get_signature(B), Data)
func_type = get_func_type(B)
checks = :($static_hasmethod($(func_type.instance), $replaced) ||
!isempty(static_methods($(func_type.instance), $replaced)))
static_method_count($(func_type.instance), $replaced) > 0)
return checks
end

Expand Down

0 comments on commit 16b18bd

Please sign in to comment.