Skip to content

Commit 9b5099b

Browse files
test: add test for retaining Num type on scalarize
1 parent db459b5 commit 9b5099b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/utils.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,9 @@ end
297297
@test Symbolics.evaluate(ltr, Dict(x => 1, y => 2))
298298
@test !Symbolics.evaluate(ltr, Dict(x => 2, y => 1))
299299
end
300+
301+
@testset "Issue #1683: Scalarization of `Num` retains type" begin
302+
@variables x
303+
x2 = Symbolics.scalarize(x)
304+
@test x2 isa Num
305+
end

0 commit comments

Comments
 (0)