SIGN IN SIGN UP

ast: Check for undefined functions before safety check

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>
T
Torin Sandall committed
f37dcea08f49424f1f4f0cb255c2505da99ab634
Parent: 793bebe