lang: Add a weird test case
Mark Smith was concerned we might not handle this case correctly. It seems we do in fact catch this scenario, so it's not an issue. Yay!
This commit is contained in:
14
lang/interpret_test/TestAstFunc2/ycombinator.txtar
Normal file
14
lang/interpret_test/TestAstFunc2/ycombinator.txtar
Normal file
@@ -0,0 +1,14 @@
|
||||
-- main.mcl --
|
||||
import "fmt"
|
||||
|
||||
$y = func($fn) {
|
||||
$fn($fn)
|
||||
}(
|
||||
func($fn) {
|
||||
$fn($fn)
|
||||
}
|
||||
)
|
||||
|
||||
test [fmt.printf("y: %v", $y),] {}
|
||||
-- OUTPUT --
|
||||
# err: errUnify: unify error with: param(fn): directly in the same set
|
||||
Reference in New Issue
Block a user