File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ isclock(c) = isa(c, TimeDomain) && @match c begin
4545 _ => false
4646end
4747
48- issolverstepclock (c) = @match c begin
48+ issolverstepclock (c) = isa (c, TimeDomain) && @match c begin
4949 SolverStepClock () => true
5050 _ => false
5151end
5252
53- iscontinuous (c) = @match c begin
53+ iscontinuous (c) = isa (c, TimeDomain) && @match c begin
5454 ContinuousClock () => true
5555 _ => false
5656end
Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ using MLStyle: @match
2424 @test ! issolverstepclock (PeriodicClock (; dt = 1.0 ))
2525 @test ! issolverstepclock (Continuous ())
2626 @test issolverstepclock (SolverStepClock ())
27+ @test ! issolverstepclock (nothing )
2728
2829 @test ! iscontinuous (PeriodicClock (; dt = 1.0 ))
2930 @test iscontinuous (Continuous ())
3031 @test ! iscontinuous (SolverStepClock ())
32+ @test ! iscontinuous (nothing )
3133
3234 @test is_discrete_time_domain (PeriodicClock (; dt = 1.0 ))
3335 @test ! is_discrete_time_domain (Continuous ())
You can’t perform that action at this time.
0 commit comments