Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env: always freshen persistent signatures before using them #2231

Merged
merged 6 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,9 @@ OCaml 4.08.0
- GPR#2175: Apply substitution to all modules when packing
(Leo White, review by Gabriel Scherer)

- GPR#2231: Env: always freshen persistent signatures before using them
(Thomas Refis and Leo White, review by Gabriel Radanne)

OCaml 4.07.1 (4 October 2018)
-----------------------------

Expand Down
Binary file modified boot/ocamlc
Binary file not shown.
Binary file modified boot/ocamllex
Binary file not shown.
12 changes: 6 additions & 6 deletions testsuite/tests/generalized-open/gpr1506.ml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ include struct open struct type t = T end let x = T end
Line 1, characters 15-41:
1 | include struct open struct type t = T end let x = T end
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The type t/66 introduced by this open appears in the signature
Error: The type t/142 introduced by this open appears in the signature
Line 1, characters 46-47:
The value x has no valid type if t/66 is hidden
The value x has no valid type if t/142 is hidden
|}];;

module A = struct
Expand All @@ -120,9 +120,9 @@ Line 3, characters 4-56:
4 | type t = T
5 | let x = T
6 | end
Error: The type t/72 introduced by this open appears in the signature
Error: The type t/148 introduced by this open appears in the signature
Line 7, characters 8-9:
The value y has no valid type if t/72 is hidden
The value y has no valid type if t/148 is hidden
|}];;

module A = struct
Expand All @@ -139,9 +139,9 @@ Line 3, characters 4-40:
3 | ....open struct
4 | type t = T
5 | end
Error: The type t/78 introduced by this open appears in the signature
Error: The type t/154 introduced by this open appears in the signature
Line 6, characters 8-9:
The value y has no valid type if t/78 is hidden
The value y has no valid type if t/154 is hidden
|}]

(* It was decided to not allow this anymore. *)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
structure_item (stop_after_typing_impl.ml[13,349+0]..stop_after_typing_impl.ml[13,349+37])
Tstr_primitive
value_description apply/3 (stop_after_typing_impl.ml[13,349+0]..stop_after_typing_impl.ml[13,349+37])
value_description apply/79 (stop_after_typing_impl.ml[13,349+0]..stop_after_typing_impl.ml[13,349+37])
core_type (stop_after_typing_impl.ml[13,349+16]..stop_after_typing_impl.ml[13,349+26])
Ttyp_arrow
Nolabel
Expand Down
6 changes: 3 additions & 3 deletions testsuite/tests/typing-sigsubst/sigsubst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ end
Line 3, characters 2-36:
3 | include Comparable with type t = t
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Illegal shadowing of included type t/20 by t/24
Error: Illegal shadowing of included type t/96 by t/100
Line 2, characters 2-19:
Type t/20 came from this include
Type t/96 came from this include
Line 3, characters 2-23:
The value print has no valid type if t/20 is shadowed
The value print has no valid type if t/96 is shadowed
|}]

module type Sunderscore = sig
Expand Down
Loading