Open spotandjake opened 2 weeks ago
I stumbled upon some more cases where this is occurring:
module Main
from "set" include Set
use Set.{ module Immutable as Set }
from "array" include Array
Array.reduce((argResult, arg) => {
Set.empty
}, Set.empty, [> 1, 1, 1, 1])
print("me")
Which also fails when refactored as below as if the reduce was inlined (to verify the behaviour):
module Main
from "set" include Set
use Set.{ module Immutable as Set }
from "array" include Array
let test = () => {
let mut acc = Set.empty
Array.forEach(el => acc = ((_, _) => {
Set.empty
})(acc, el), [>1, 1, 1, 1])
}
test()
I ran into a wierd decRef error with the below code:
This also happens if dependencyExists is a char or really any stack type. However if it is a Number, or heap type this error does not occur. Some cases that do work are below: