Commit 576e9d76 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Revert "Allow compilation of patterns to succeed even when the variables of...

Revert "Allow compilation of patterns to succeed even when the variables of the expected input type cannot be erased."

This reverts commit 439186cd.

This commit generates unsafe code that crashes easily at runtime.
parent 439186cd
...@@ -1403,15 +1403,9 @@ module Compile = struct ...@@ -1403,15 +1403,9 @@ module Compile = struct
let make_branches t b = let make_branches t b =
let open Debug in
_DEBUG "pat_comp" "@[make_branches type is: %a@]@\n" Types.Print.pp_type t;
try try
make_branches t b make_branches t b
with with
FindCode -> FindCode -> make_branches (Types.Subst.hide_vars t) b
try
make_branches (Types.Subst.hide_vars t) b
with
FindCode -> make_branches Types.any b
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment