diff --git a/lib/typing/env.ml b/lib/typing/env.ml index 2dcc9efa..4c36f91e 100644 --- a/lib/typing/env.ml +++ b/lib/typing/env.ml @@ -261,7 +261,7 @@ let add_external ext_name ~cname typ loc env = ext_name; ext_typ = typ; ext_cname = cname; - imported = None; + imported = Some (env.modpath, `C); used; closure = false; } diff --git a/test/modules.t/run.t b/test/modules.t/run.t index 7532e29c..c4297b39 100644 --- a/test/modules.t/run.t +++ b/test/modules.t/run.t @@ -1101,3 +1101,6 @@ Fix handling of parameterized abstract types $ schmu -m nullvec.smu $ schmu use_nullvec.smu $ valgrind -q --leak-check=yes --show-reachable=yes ./use_nullvec + +Fix external declarations in inner modules + $ schmu inner_module_externals.smu