Skip to content

pattern-matching gives inconsistent results #7675

@vicuna

Description

@vicuna

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions