Skip to content

Commit 886b6b2

Browse files
committed
Test float record with dead field
1 parent c2a49a5 commit 886b6b2

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

compiler/tests-wasm_of_ocaml/dune

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(executables
2-
(names gh38 gh46)
2+
(names gh38 gh46 gh107)
33
(modes js)
44
(js_of_ocaml
5-
(flags :standard --disable optcall)))
5+
(flags :standard --disable optcall --no-inline)))
66

77
(rule
88
(target gh38.actual)
@@ -23,3 +23,13 @@
2323
(with-outputs-to
2424
%{target}
2525
(run node %{dep:gh46.bc.js}))))
26+
27+
(rule
28+
(target gh107.actual)
29+
(enabled_if
30+
(= %{profile} wasm))
31+
(alias runtest)
32+
(action
33+
(with-outputs-to
34+
%{target}
35+
(run node %{dep:gh107.bc.js}))))
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[@@@warning "-69"]
2+
3+
type t =
4+
{ x : float
5+
; y : float
6+
}
7+
8+
let () =
9+
let f x = { x; y = 2. } in
10+
let x = f 1. in
11+
Format.eprintf "%f@." x.y

0 commit comments

Comments
 (0)