Skip to content

Commit

Permalink
Earlier error message
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Feb 27, 2024
1 parent 8842aa6 commit 81d67e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ julia> D3 = Differential(x)^3 # 3rd order differential operator
struct Differential <: Operator
"""The variable or expression to differentiate with respect to."""
x::BasicSymbolic
function Differential(x)
function Differential(x::BasicSymbolic)
vx = value(x)
SymbolicUtils.exprtype(vx) == SymbolicUtils.SYM || throw(ArgumentError("Must differentiate with respect to a symbol, got $vx"))
new(vx)
Expand Down

0 comments on commit 81d67e4

Please sign in to comment.