Skip to content

Pervasives.max is broken on float type in v12 #7332

Closed
@JonoPrest

Description

@JonoPrest

Pervasives.max on a float type uses Primitive_bool.max in rescript 12

https://rescript-lang.org/try?version=v12.0.0-alpha.9&module=esmodule&code=DYUwLgBAhhC8EFYB0AGAUKSAjOEBsqaG4EAtrqVAB4AUUANBFgJRA

let a = 5.0
let b = 6.0

let m = max(a, b)
JavaScript
Output
Problems
Settings
// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Primitive_bool from "./stdlib/Primitive_bool.js";

let m = Primitive_bool.max(5.0, 6.0);

let a = 5.0;

let b = 6.0;

export {
  a,
  b,
  m,
}
/* No side effect */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions