yasl
yasl copied to clipboard
Calling `require` too late in file causes crash.
The following example will crash:
const x = [ 'a']
const y = []
echo x
y->sort(fn(a, b) {
return a->tostr('x') < b->tostr('x')
})
y->sort(fn(a, b) {
y->push(a)
return a < b
})
echo y
const re = require('tuple')
This is not surprising given how badly require is written.
Could not repro, I assume this was a problem with how the tuple module was compiled when I checked this. Have not been able to repro with the given example or any similar ones.