I assumed that value(true) and value(false) would return their argument, but they produce key_not_found errors instead:
$ node eneyj/src/eneyj.js
eneyj v0.1.0
language is set to English
Enter .help for help
> value(true)
{
"Z1K1": "Z15",
"Z1K2": "Z443",
"Z1K3": {
"Z1K1": "Z12",
"Z12K1": [
{
"Z1K1": "Z11",
"Z11K1": "Z251",
"Z11K2": "key_not_found"
}
]
}
}
> value(false)
{
"Z1K1": "Z15",
"Z1K2": "Z443",
"Z1K3": {
"Z1K1": "Z12",
"Z12K1": [
{
"Z1K1": "Z11",
"Z11K1": "Z251",
"Z11K2": "key_not_found"
}
]
}
}
I noticed this when I was implementing “if” in GraalEneyj, figured that if(value(true), "then", "else") would be a nice test case of a non-constant reference condition, and was surprised to find that eneyj produced "else" rather than "then" as I expected:
I assumed that
value(true)
andvalue(false)
would return their argument, but they produce key_not_found errors instead:I noticed this when I was implementing “if” in GraalEneyj, figured that
if(value(true), "then", "else")
would be a nice test case of a non-constant reference condition, and was surprised to find that eneyj produced"else"
rather than"then"
as I expected: