Skip to content

Commit c00a882

Browse files
committed
Fix broken get_variables after 0abe0d
1 parent 5e3d735 commit c00a882

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

src/ir.jl

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,23 @@ struct PartialSum <: IR
7979
end
8080

8181
function _get_variables(arg::Mat)
82-
if arg.id isa String
83-
return arg.id
84-
end
85-
86-
return nothing
82+
return _get_variables(arg.id)
8783
end
8884

8985
function _get_variables(arg::Vec)
90-
if arg.id isa String
91-
return arg.id
92-
end
93-
94-
return nothing
86+
return _get_variables(arg.id)
9587
end
9688

9789
function _get_variables(arg::Scal)
98-
if arg.id isa String
99-
return arg.id
100-
end
90+
return _get_variables(arg.id)
91+
end
10192

102-
return nothing
93+
function _get_variables(arg::Var)
94+
return arg.id
95+
end
96+
97+
function _get_variables(arg::Const)
98+
return arg.value
10399
end
104100

105101
function _get_variables(arg::Real)

0 commit comments

Comments
 (0)