Commit cb122ec
authored
test: regression guard for include-flag soundness through pre-pp entry (#14435)
## Summary
Adds a cross-library cram test: a consumer reaches a transitive type
only through a *preprocessed* library's `.mli`, where the type is never
syntactically named in the consumer's source.
Three libraries:
- `other_dep` — unwrapped, exposes `type t = { x : int; y : string }`.
- `pp_dep` — unwrapped + preprocessed, depends on `other_dep`, exposes
`val make_thing : unit -> Other.t`.
- `consumer` — depends on `pp_dep`, accesses `(D.make_thing ()).x`.
`consumer/c.ml` never mentions `Other`, but the field access forces the
type checker to load `other.cmi`. The test asserts `dune build @check`
succeeds.
Sibling to #14400's `cross-lib-walk-pre-pp-source.t`. That test
exercises behaviour at a preprocessed entry directly; this one exercises
the *transitive* leg — where the preprocessed entry's `.mli` re-exports
a type from a deeper library.1 file changed
Lines changed: 75 additions & 0 deletions
File tree
- test/blackbox-tests/test-cases/per-module-lib-deps
Lines changed: 75 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments