Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006491OCamlOCaml typingpublic2014-07-19 12:502014-09-15 16:14
Reporterlpw25 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version4.02.2+devFixed in Version 
Summary0006491: Recursive modules do not correctly handle class inheritance
DescriptionRecursive modules can contain classes or class types which inherit from each other. However, since inheritance is done by copying the methods and values, the information only passes through one layer of inheritance. For example the `x` method is missing from `Baz.c` in the following:

    # module rec Foo : sig class type c = object method x : int end end = Foo
      and Bar : sig class type c = object inherit Foo.c end end = Bar
      and Baz : sig class type c = object inherit Bar.c end end = Baz;;
        module rec Foo : sig class type c = object method x : int end end
    and Bar : sig class type c = object method x : int end end
    and Baz : sig class type c = object end end

Module types would suffer from the same problem, but instead it gives an error:

    # module rec Foo : sig module type c = sig val x : int end end = Foo
      and Bar : sig module type c = sig include Foo.c end end = Bar
      and Baz : sig module type c = sig include Bar.c end end = Baz;;
        Characters 111-116:
        and Bar : sig module type c = sig include Foo.c end end = Bar
                                                  ^^^^^
    Error: Illegal recursive module reference

The same could be achieved for inheritance by calling `find_class_type` on any inherited class types during `approx_class`.
Tagsrecmod
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-07-19 12:50 lpw25 New Issue
2014-07-30 13:41 doligez Tag Attached: recmod
2014-07-30 22:39 doligez Status new => acknowledged
2014-07-30 22:39 doligez Target Version => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-15 16:14 doligez Target Version undecided => 4.02.2+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker