diff --git a/test/blackbox-tests/test-cases/intf-only/excludes-by-modules-field.t b/test/blackbox-tests/test-cases/intf-only/excludes-by-modules-field.t new file mode 100644 index 00000000000..d0c117e0365 --- /dev/null +++ b/test/blackbox-tests/test-cases/intf-only/excludes-by-modules-field.t @@ -0,0 +1,27 @@ +Specifying a module without implementation that isn't inside the (modules ..) +field + + $ cat >dune-project < (lang dune 3.7) + > EOF + $ cat >dune < (library + > (name foo) + > (wrapped false) + > (modules_without_implementation x) + > (modules y)) + > EOF + + $ touch x.mli + + $ cat >y.ml < module type F = X + > EOF + + $ dune build --display short + ocamlc .foo.objs/byte/y.{cmi,cmo,cmt} (exit 2) + File "y.ml", line 1, characters 16-17: + 1 | module type F = X + ^ + Error: Unbound module type X + [1]