Skip to content

Commit 0d396e7

Browse files
committed
Revert "Remove symbol type assertion"
This reverts commit c22ac5c.
1 parent b426191 commit 0d396e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/DynamicExpressionsOptimExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct ExpressionOptimizationResults{R<:OptimizationResults,N<:AbstractExpressio
1818
tree::N # The final expression tree
1919
end
2020
#! format: on
21-
function Base.getproperty(r::ExpressionOptimizationResults, s)
21+
function Base.getproperty(r::ExpressionOptimizationResults, s::Symbol)
2222
if s == :tree || s == :minimizer
2323
return getfield(r, :tree)
2424
else

src/EquationUtils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ struct NodeConstantRef{T,N<:AbstractExpressionNode{T}}
111111
return new{_T,_N}(Ref(node))
112112
end
113113
end
114-
function Base.getproperty(cr::NodeConstantRef{T}, s) where {T}
114+
function Base.getproperty(cr::NodeConstantRef{T}, s::Symbol) where {T}
115115
s != :x && error("Only :x is a valid property for NodeConstantRef")
116116

117117
return getfield(cr, :_node).x.val::T
118118
end
119-
function Base.setproperty!(cr::NodeConstantRef{T}, s, v) where {T}
119+
function Base.setproperty!(cr::NodeConstantRef{T}, s::Symbol, v) where {T}
120120
s != :x && error("Only :x is a valid property for NodeConstantRef")
121121

122122
return getfield(cr, :_node).x.val::T = v::T

0 commit comments

Comments
 (0)