-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pattern-matching gives inconsistent results #7675
Copy link
Copy link
Closed
Milestone
Description
Original bug ID: 7675
Reporter: @damiendoligez
Status: resolved (set by @xavierleroy on 2017-11-21T16:06:56Z)
Resolution: not a bug
Priority: urgent
Severity: block
Version: 4.06.0
Target version: 4.06.1+dev/rc1/rc2
Category: middle end (typedtree to clambda)
Bug description
In the example program below, the assertion should never fail but it does fail in 4.06.0 (and not in 4.05.0).
If you remove the partial application (definition of f) and do total applications, the problem disappears.
Steps to reproduce
compile and run this program:
let add_bit ({contents} as t) _ =
assert (contents = t.contents);
t.contents <- 1
let f = add_bit (ref 0)
;; f false
;; f false
Reactions are currently unavailable