Skip to content

Commit 1f52f2d

Browse files
determine derivative constants from dependents
1 parent 901c1ea commit 1f52f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Base.:*(D::Differential,x::Operation) = Operation(Derivative,Expression[x,D])
1212
function Base.:*(D::Differential,x::Variable)
1313
if D.x === x
1414
return Constant(1)
15-
elseif x.subtype != :DependentVariable || D.x.subtype != :IndependentVariable
15+
elseif D.x x.dependents
1616
return Constant(0)
1717
else
1818
return Variable(x,D)

0 commit comments

Comments
 (0)