Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Update a testcase in principality-and-gadts.ml to reflect changes in #9584#510

Merged
ctk21 merged 2 commits intoocaml-multicore:4.12+domains+effectsfrom
shubhamkumar13:fix-typing-gadts-test-principality-and-gadts
Mar 25, 2021
Merged

Update a testcase in principality-and-gadts.ml to reflect changes in #9584#510
ctk21 merged 2 commits intoocaml-multicore:4.12+domains+effectsfrom
shubhamkumar13:fix-typing-gadts-test-principality-and-gadts

Conversation

@shubhamkumar13
Copy link
Copy Markdown
Contributor

This PR updates a testcase which was logging out a different warning message in mulitcore when compared to 4.12 branch in ocaml/ocaml.

The log looked something like this

--- principality-and-gadts.ml	2021-03-18 15:26:04.493555453 +0530
+++ principality-and-gadts.ml.corrected.corrected	2021-03-22 12:42:09.893389521 +0530
@@ -404,7 +404,7 @@
 Line 3, characters 29-34:
 3 |   | { x = (x : string); eq = Refl3 } -> x
                                  ^^^^^
-Warning 18 [not-principal]: typing this pattern requires considering M.t and string as equal.
+Warning 18 [not-principal]: typing this pattern requires considering M.t and N.t as equal.
 But the knowledge of these types is not principal.
 val foo : string foo -> string = <fun>
 |}]
)
> Specified modules: principality-and-gadts.ml
> Source modules: principality-and-gadts.ml
> Running test expect with 3 actions
> 
> Running action 1/3 (setup-simple-build-env)
> Action 1/3 (setup-simple-build-env) passed
> 
> Running action 2/3 (run-expect)
> Commandline: /home/sk/ocaml-multicore/runtime/ocamlrun /home/sk/ocaml-multicore/testsuite/tools/expect_test -repo-root /home/sk/ocaml-multicore principality-and-gadts.ml
> Commandline: /home/sk/ocaml-multicore/runtime/ocamlrun /home/sk/ocaml-multicore/testsuite/tools/expect_test -repo-root /home/sk/ocaml-multicore -principal principality-and-gadts.ml.corrected
> Action 2/3 (run-expect) passed
> 
> Running action 3/3 (check-program-output)
> Comparing program output principality-and-gadts.ml.corrected.corrected to reference principality-and-gadts.ml
> Action 3/3 (check-program-output) failed (program output principality-and-gadts.ml.corrected.corrected differs from reference principality-and-gadts.ml: 
> --- principality-and-gadts.ml	2021-03-18 15:26:04.493555453 +0530
> +++ principality-and-gadts.ml.corrected.corrected	2021-03-22 12:42:09.893389521 +0530
> @@ -404,7 +404,7 @@
>  Line 3, characters 29-34:
>  3 |   | { x = (x : string); eq = Refl3 } -> x
>                                   ^^^^^
> -Warning 18 [not-principal]: typing this pattern requires considering M.t and string as equal.
> +Warning 18 [not-principal]: typing this pattern requires considering M.t and N.t as equal.
>  But the knowledge of these types is not principal.
>  val foo : string foo -> string = <fun>
>  |}]
> 
> )

Specifically this line

> -Warning 18 [not-principal]: typing this pattern requires considering M.t and string as equal.
> +Warning 18 [not-principal]: typing this pattern requires considering M.t and N.t as equal.

which ocaml#9584 updates to reflect the one multicore produces.
ocaml/ocaml#9584

@ctk21
Copy link
Copy Markdown
Collaborator

ctk21 commented Mar 25, 2021

Thanks for investigating this. We will move into line with trunk.

@ctk21 ctk21 merged commit c5f7152 into ocaml-multicore:4.12+domains+effects Mar 25, 2021
sadiqj added a commit to sadiqj/ocaml-multicore that referenced this pull request Apr 12, 2021
abbysmal pushed a commit to abbysmal/ocaml-multicore that referenced this pull request May 20, 2021
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
…mar13/fix-typing-gadts-test-principality-and-gadts

Update a testcase in principality-and-gadts.ml to reflect changes in ocaml#9584
sadiqj added a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants