Skip to content

[refmt] record def vs record construction #2183

@leostera

Description

@leostera

Input

type s = { a: int, someInstanceVar: ref(int) };
let s = { a: 111, someInstanceVar: ref(222) };

Expected

type s = {
  a: int,
  someInstanceVar: ref(int),
};
let s = {
  a: 111,
  someInstanceVar: ref(222),
};

Actual

type s = {
  a: int,
  someInstanceVar: ref(int),
};
let s = {a: 111, someInstanceVar: ref(222)};

Workaround

type s = {
  a: int,
  someInstanceVar: ref(int),
};
let s = {
  /* please don't contract this */
  a: 111,
  someInstanceVar: ref(222),
};

Is this intended? It felt wrong to have to add comments to force the expansion of the value record.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Printerthings that have to do with turning an AST into Reason code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions