summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2019-09-05 21:01:42 +0200
committerGitHub <noreply@github.com>2019-09-05 21:01:42 +0200
commitbf240cbab534d8b0af2ff75c0d19064dd398024f (patch)
tree3d03a8860409cfefdb8eed990f7bcee48306e3a6 /testsuite
parent3b68ffd302a73c5c1b1a7ce13cda7b0f901154d8 (diff)
parente8498699f93ebb027cbd78aabcf88546e5c82baf (diff)
downloadocaml-bf240cbab534d8b0af2ff75c0d19064dd398024f.tar.gz
Merge pull request #8914 from gasche/clarify-unboxed-warning
clarify the warning of the unboxable-type-in-primitive warning
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typing-unboxed/test.ml36
1 files changed, 24 insertions, 12 deletions
diff --git a/testsuite/tests/typing-unboxed/test.ml b/testsuite/tests/typing-unboxed/test.ml
index 3ac3e27a6e..03edd5254a 100644
--- a/testsuite/tests/typing-unboxed/test.ml
+++ b/testsuite/tests/typing-unboxed/test.ml
@@ -413,10 +413,14 @@ type i = I of int
Line 2, characters 0-34:
2 | external id : i -> i = "%identity";;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Warning 61: This primitive declaration uses type i, which is unannotated and
-unboxable. The representation of such types may change in future
-versions. You should annotate the declaration of i with [@@boxed]
-or [@@unboxed].
+Warning 61: This primitive declaration uses type i, whose representation
+may be either boxed or unboxed. Without an annotation to indicate
+which representation is intended, the boxed representation has been
+selected by default. This default choice may change in future
+versions of the compiler, breaking the primitive implementation.
+You should explicitly annotate the declaration of i
+with [@@boxed] or [@@unboxed], so that its external interface
+remains stable in the future.
external id : i -> i = "%identity"
|}];;
@@ -429,17 +433,25 @@ type j = J of int
Line 3, characters 0-34:
3 | external id : i -> j = "%identity";;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Warning 61: This primitive declaration uses type i, which is unannotated and
-unboxable. The representation of such types may change in future
-versions. You should annotate the declaration of i with [@@boxed]
-or [@@unboxed].
+Warning 61: This primitive declaration uses type i, whose representation
+may be either boxed or unboxed. Without an annotation to indicate
+which representation is intended, the boxed representation has been
+selected by default. This default choice may change in future
+versions of the compiler, breaking the primitive implementation.
+You should explicitly annotate the declaration of i
+with [@@boxed] or [@@unboxed], so that its external interface
+remains stable in the future.
Line 3, characters 0-34:
3 | external id : i -> j = "%identity";;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Warning 61: This primitive declaration uses type j, which is unannotated and
-unboxable. The representation of such types may change in future
-versions. You should annotate the declaration of j with [@@boxed]
-or [@@unboxed].
+Warning 61: This primitive declaration uses type j, whose representation
+may be either boxed or unboxed. Without an annotation to indicate
+which representation is intended, the boxed representation has been
+selected by default. This default choice may change in future
+versions of the compiler, breaking the primitive implementation.
+You should explicitly annotate the declaration of j
+with [@@boxed] or [@@unboxed], so that its external interface
+remains stable in the future.
external id : i -> j = "%identity"
|}];;