Fix regression with derived sources

This commit is contained in:
aaron 2024-07-19 11:21:49 +01:00
parent 4f3fccd3bb
commit 2dc2814d76
3 changed files with 34 additions and 4 deletions

View file

@ -2261,6 +2261,27 @@ TEST("strict", wrap_root(function()
src(not src())
CHECK(count == 4)
end
do CASE "effect using derived source"
local input = source(true)
local output = derive(function()
return input()
end)
local count = 0
effect(function()
output()
count += 1
end)
CHECK(count == 2)
input(false)
CHECK(count == 4)
end
end))
local ok = FINISH()