Skip to content

Using plus in module affects type environment in the rest of the code. #7275

Closed
@cristianoc

Description

@cristianoc

See change in:
https://github.com/rescript-lang/rescript/pull/7057/files#r1941028210

The following code does not typecheck:

module X = {
  type t = int
  let n : t => t = x => x+1
}

let z : X.t = 3

Outside the module, the fact that type X.t is the same as int is lost. This happens only with the unused binding to n.
Presumably the type environment is left in some inconsistent state, or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions