Skip to content

object constructor generation field reordering in sem breaks order of evaluation #1056

@metagn

Description

@metagn

i.e.

type Foo = object
  a, b: int

let x = Foo(
  b: foo()
  a: bar())

gets rewritten to:

Foo(
  a: bar()
  b: foo())

in an attempt to set every field. It should probably use the order of the given fields, then set the defaults of the remaining fields (or do this first).

Metadata

Metadata

Assignees

No one assigned

    Labels

    CompatCould be adapted to compatibility mode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions