mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-17 22:13:00 -06:00
f37dcea08f
Previously, references to undefined functions were caught after the safety check ran. As a result, if the function call contained one or more unsafe variables, the compiler would report safety errors instead of undefined function errors. This would hide the source of the problem and result in confusion. For example, before: > data.deadbeef(x) 1 error occurred: 1:1: rego_unsafe_var_error: var x is unsafe After: > data.deadbeef(x) 1 error occurred: 1:1: rego_type_error: undefined function data.deadbeef Fixes #1141 Signed-off-by: Torin Sandall <torinsandall@gmail.com>