Skip to content

Commit 1aa2399

Browse files
authored
Merge pull request #743 from SciML/myb/precomp
Fix duplicate method definition
2 parents 01dd15e + 2750de9 commit 1aa2399

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ModelingToolkit"
22
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "5.0.0"
4+
version = "5.0.1"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/register_function.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ macro register(expr, Ts = [Num, Symbolic, Real])
4545
end
4646
end)
4747
end
48-
push!(ex.args, :((::$typeof($promote_symtype))(::$typeof($f), args...) = $ret_type))
48+
push!(
49+
ex.args,
50+
quote
51+
if $!($hasmethod($promote_symtype, $Tuple{$typeof($f), $Vararg}))
52+
(::$typeof($promote_symtype))(::$typeof($f), args...) = $ret_type
53+
end
54+
end
55+
)
4956
esc(ex)
5057
end
5158

0 commit comments

Comments
 (0)