-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Terminating semi-colon ignored by -strict-sequence #7193
Copy link
Copy link
Closed
Labels
Description
Original bug ID: 7193
Reporter: @lpw25
Status: acknowledged (set by @damiendoligez on 2016-03-24T18:19:11Z)
Resolution: open
Priority: normal
Severity: feature
Target version: undecided
Category: typing
Related to: #6961
Monitored by: @gasche @diml @jmeber @hcarty
Bug description
I think that when strict sequence is turned on, the following code:
let f foo bar =
let a =
foo ();
bar ();
in
a;;
should have type:
val f : (unit -> unit) -> (unit -> unit) -> unit =
rather than the current:
val f : (unit -> unit) -> (unit -> 'a) -> 'a =
as this would be more consistent.
It somewhat depends on how you think of strict sequence, but I think one reasonable meaning is "force things before semi-colons to have type unit" and, for this meaning, the above is a bug.
Reactions are currently unavailable