Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Jun 6, 2024
1 parent 3de5131 commit 1af3083
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/dim-converts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,14 @@ end
test_cleanup(dates)
end
end

@testset "Type constraints (#3938)" begin
# Integers cannot be converted to Irrationals,
# so if the type of the observable is tightened
# somewhere within the pipeline, there should be a
# conversion error!
obs = Observable{Vector}([π, π])
f, a, p = plot(obs)
obs.val = [1, 1] # Integers are not convertible to Irrational, so if the type was "solidified" here, there should be a conversion error
@test_nowarn notify(obs)
end

0 comments on commit 1af3083

Please sign in to comment.