Skip to content

Empty record pattern match gives useless error message #5064

@theScottyJam

Description

@theScottyJam

Using an "empty pattern" when pattern matching against a record gives the following error message: "File "typecore.ml", line 1234, characters 6-12: Assertion failed". This error message gives no information about which line number or file the issue is happening with, nor does it explain what went wrong.

Example code that reproduces this issue:

let {} = { id: 3 }

This can easily be reproduced by copying the above snippet into the ReScript playground.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions