Skip to content

Commit 40725c8

Browse files
authored
Allow unboxed floats (+ annotations + any) in -extension layouts (#2003)
* Move float# (and immediate) into Stable * Fix tests * Fix more tests * Fix test output * Update test output
1 parent 42fe5f9 commit 40725c8

20 files changed

+3052
-2118
lines changed

ocaml/boot/menhir/parser.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ let unboxed_float sloc sign (f, m) =
12111211

12121212
let assert_unboxed_float_type ~loc =
12131213
Language_extension.(
1214-
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Beta)
1214+
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Stable)
12151215

12161216
let unboxed_float_type sloc tys =
12171217
assert_unboxed_float_type ~loc:(make_loc sloc);

ocaml/parsing/builtin_attributes.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,9 @@ let jkind ~legacy_immediate attrs =
506506
| Value -> check true
507507
| Immediate | Immediate64 ->
508508
check (legacy_immediate
509-
|| Language_extension.(is_at_least Layouts Beta))
509+
|| Language_extension.(is_at_least Layouts Stable))
510510
| Any | Float64 ->
511-
check Language_extension.(is_at_least Layouts Beta)
511+
check Language_extension.(is_at_least Layouts Stable)
512512
| Void ->
513513
check Language_extension.(is_at_least Layouts Alpha)
514514

ocaml/parsing/parser.mly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ let unboxed_float sloc sign (f, m) =
986986

987987
let assert_unboxed_float_type ~loc =
988988
Language_extension.(
989-
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Beta)
989+
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Stable)
990990

991991
let unboxed_float_type sloc tys =
992992
assert_unboxed_float_type ~loc:(make_loc sloc);

0 commit comments

Comments
 (0)