Files
regorus/tests/interpreter/cases/builtins/numbers/div.yaml
T
Anand Krishnamoorthi 1e4ff952e6 feat!: Introduce structured destructuring plans for bindings (#485)
- add a dedicated `compiler/destructuring_planner` feature that precomputes binding plans for assignments, parameters, and `some in` expressions
- enrich `ScopeContext` with same-scope tracking, local scheduling hints, and module globals so the planner enforces := shadowing rules without blocking parent scopes
- wire the planner through compiler, hoist, interpreter, and engine paths while updating binding plan variants and adding query traversal helpers for dependency analysis
- document the new planner architecture and ship interpreter regressions that exercise nested destructuring, shadowing, and error reporting

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2025-10-21 15:57:49 -05:00

49 lines
857 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: div
data: {}
modules:
- |
package test
import future.keywords.if
# Undefined
y if false
b = y / 1
c = 1 / y
d = 15.3 / 3
e = 13 / 4
z {
x = 1/3
y = 0.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
x == y
}
query: data.test
want_result:
d: 5.1
e: 3.25
- note: non-numeric
data: {}
modules:
- |
package test
x = "1" / 9
query: data.test.x
error: "`div` expects numeric argument."
- note: div by zero
data: {}
modules:
- |
package test
a = 1/ 0
query: data.test
error: divide by zero