File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ function (s::Signal)()
41
41
end
42
42
43
43
function pull! (s:: Signal )
44
- if ! s. valid
45
- s. value = s. action ()
46
- s. valid = true
47
- end
44
+ if ! s. valid
45
+ s. value = s. action ()
46
+ s. valid = true
47
+ end
48
48
s. value
49
49
end
50
50
51
51
function (s:: Signal )(value)
52
- s. action != nothing && error (" Can't modify state of computed signal." );
52
+ s. action != nothing && error (" Can't modify state of computed signal." )
53
53
invalidate (s)
54
54
s. value = value
55
55
s. valid = true
Original file line number Diff line number Diff line change 74
74
75
75
@testset " Circular dependencies" begin
76
76
a = Signal (1 )
77
- b = computed (() -> a ()+ 1 )
78
- c = computed (() -> begin a (2 );println (a ()); a () + b (); end )
77
+ b = computed (() -> a () + 1 )
78
+ c = computed (() -> begin
79
+ a (2 )
80
+ println (a ())
81
+ a () + b ()
82
+ end )
79
83
end
80
84
81
85
# @testset "Slow state update" begin
You can’t perform that action at this time.
0 commit comments