From 759137328ab1ee137370e6c06e97e9f3a37dc90e Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Fri, 7 Feb 2020 15:44:29 -0500 Subject: [PATCH] add ambiguity fixes --- Project.toml | 2 +- src/differentials.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9af1ac1436..ef621c6124 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ModelingToolkit" uuid = "961ee093-0014-501f-94e3-6117800e7a78" authors = ["Chris Rackauckas "] -version = "1.2.1" +version = "1.2.2" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/src/differentials.jl b/src/differentials.jl index 955a715475..0faf4233d9 100644 --- a/src/differentials.jl +++ b/src/differentials.jl @@ -110,6 +110,8 @@ for (modu, fun, arity) ∈ DiffRules.diffrules() end derivative(::typeof(+), args::NTuple{T,Operation}, ::Val{i}) where {T,i} = args[i] +derivative(::typeof(+), args::Tuple{Operation,Operation}, ::Val{1}) = args[1] +derivative(::typeof(+), args::Tuple{Operation,Operation}, ::Val{2}) = args[2] function count_order(x) @assert !(x isa Symbol) "The variable $x must have an order of differentiation that is greater or equal to 1!"