Bind libraries backward for consistent shadowing

This commit is contained in:
Muh Muhten authored and Nico Williams committed 2019-02-26 21:57:08 -06:00
1 parent 141bb78e96
commit abed751e96
9 files changed
+32 -4

No files matched your search

+5 -1
View File
@@ -240,7 +240,11 @@ static int process_dependencies(jq_state *jq, jv jq_origin, jv lib_origin, block
block bk = *src_block;
int nerrors = 0;
jv_array_foreach(deps, i, dep) {
// XXX This is a backward jv_array_foreach because bindings go in reverse
for (int i = jv_array_length(jv_copy(deps)); i > 0; ) {
i--;
jv dep = jv_array_get(jv_copy(deps), i);
const char *as_str = NULL;
int is_data = jv_get_kind(jv_object_get(jv_copy(dep), jv_string("is_data"))) == JV_KIND_TRUE;
int raw = 0;