Skip to content

fix(checker): detect $env() calls at compile time#923

Merged
antonmedv merged 1 commit intoexpr-lang:masterfrom
thevilledev:fix/clusterfuzz-481635418
Feb 5, 2026
Merged

fix(checker): detect $env() calls at compile time#923
antonmedv merged 1 commit intoexpr-lang:masterfrom
thevilledev:fix/clusterfuzz-481635418

Conversation

@thevilledev
Copy link
Contributor

Previously, expressions like $env(abs()) would compile without error and cause a runtime "stack underflow" panic. The checker now validates that $env cannot be used as a function callee, producing a clear error message like "map[string]interface {} is not callable".

Maybe a more long-term fix would be to add an EnvNode AST type. Now $env is used here and there as-is.

Relates to #922.

Previously, expressions like `$env(abs())` would compile without error
and cause a runtime "stack underflow" panic. The checker now validates
that $env cannot be used as a function callee, producing a clear error
message like "map[string]interface {} is not callable".

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@antonmedv antonmedv merged commit 2aaa9aa into expr-lang:master Feb 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants