Skip to content

Compiler conflates object types with Js.t object types #758

@jchavarri

Description

@jchavarri

Not that the object part of the compiler is very used in Melange, but there seems to be some internal coercion that is unsafe.

class type node = {
  pub nodeName: string;
};
let node: node = {
  "nodeName": "div",
};

Js.log(node#nodeName)

Crashes at runtime: Cannot read properties of undefined (reading '0').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions