We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34a037 commit e90e6c4Copy full SHA for e90e6c4
testsuite/tests/typing-local/partial_app_dead_gadt_case.ml
@@ -0,0 +1,27 @@
1
+(* TEST
2
+ {
3
+ stack-allocation;
4
+ ocamlopt_flags = "-Oclassic";
5
+ }{
6
7
+ ocamlopt_flags = "-O3";
8
+ }
9
+*)
10
+
11
+type (_,_) eq = Refl : ('a, 'a) eq
12
13
+let apply (type a) (equ : (a, unit -> unit) eq option) (f : a) =
14
+ match equ with
15
+ | None -> ()
16
+ | Some Refl -> f ()
17
18
+let fn (local_ x) (local_ y) = ()
19
20
+let bad p = apply p fn
21
22
+(* More minimal example: *)
23
24
+let cast (type a b) (Refl : (a, b) eq) (f : a) : b = f
25
26
27
+let bad2 p = cast p fn ()
0 commit comments