Skip to content

Destructive substitution on classes produces unrepresentable module type #6654

@vicuna

Description

@vicuna

Original bug ID: 6654
Reporter: @lpw25
Status: confirmed (set by @damiendoligez on 2015-01-07T18:57:14Z)
Resolution: open
Priority: normal
Severity: feature
Target version: later
Category: typing
Related to: #4791
Monitored by: @hcarty

Bug description

If you apply destructive substitution to a class or class type the type system handles it correctly, but the resulting module type cannot be represented by OCaml's syntax:

# module type S = sig
    class c : object method
    m : int end
  end;;
module type S = sig class c : object method m : int end end

# class d = object method m = 3 end;;
class d : object method m : int end

# module type T = S with type c := d;;
module type T =
  sig
    class c : object method m : int end
    class type c = object method m : int end
    type #c = #d
  end

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