├── Debug2.ml ├── Debug3.ml ├── README.md ├── Debug1.ml └── Makefile /Debug2.ml: -------------------------------------------------------------------------------- 1 | open Debug1 2 | 3 | (* error message reports type 't_ee' instead of 't_c' *) 4 | let y = x + 1 5 | -------------------------------------------------------------------------------- /Debug3.ml: -------------------------------------------------------------------------------- 1 | (* error message reports type 'Debug1.t_ee' instead of 'Debug1.t_c' *) 2 | let y = Debug1.x + 1 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is the code for [ocaml issue 2 | 10432](https://github.com/ocaml/ocaml/issues/10432). Run it with: 3 | 4 | ``` 5 | $ make 6 | ``` 7 | -------------------------------------------------------------------------------- /Debug1.ml: -------------------------------------------------------------------------------- 1 | (* original type definition *) 2 | type t_c = A 3 | 4 | (* aliases *) 5 | type t_b = t_c 6 | type t_d = t_c 7 | type t_ee = t_c 8 | type t_a = t_c 9 | 10 | let x = A 11 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Usage: 3 | # - make 4 | # - make clean 5 | # 6 | 7 | .PHONY: build 8 | build: 9 | ocamlc -c Debug1.ml 10 | @echo "=== shows the correct type alias ===" 11 | -ocamlc -c Debug2.ml 12 | echo 13 | @echo "=== shows the wrong type alias ===" 14 | -ocamlc -c -short-paths Debug2.ml 15 | echo 16 | @echo "=== shows the wrong type alias ===" 17 | -ocamlc -c -short-paths Debug3.ml 18 | 19 | .PHONY: clean 20 | clean: 21 | rm -f *.cm[io] 22 | --------------------------------------------------------------------------------