Skip to content

Problem with record coercion and inlining #6253

Closed
@cristianoc

Description

@cristianoc

In the following example name is 42 instead of "Name" because inlining presumably takes the value at face value and inlines the first element.

type a = {
  number: int,
  name: string,
}

type b = {
  name: string,
}

let a: a = {
  number: 42,
  name: "Name",
}

let name = (a :> b).name

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions