Skip to content

Commit

Permalink
Handle the lazy compilation special cases in recursion analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
yallop committed Sep 25, 2017
1 parent 8156dac commit a1363c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion typing/typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,14 @@ struct
| Texp_function { cases } ->
Use.delay (list (case ~scrutinee:Use.empty) env cases)
| Texp_lazy e ->
Use.delay (expression env e)
begin match Typeopt.classify_lazy_argument e with
| `Constant_or_function
| `Identifier _
| `Float ->
expression env e
| `Other ->
Use.delay (expression env e)
end
| Texp_unreachable ->
Use.empty
| Texp_extension_constructor _ ->
Expand Down

0 comments on commit a1363c9

Please sign in to comment.