type equality a in polymorphic field #5673
Original bug ID: 5673
A parameterized class signature in classdef.mli cause a type equality problem in the definition of a record with a polymorphic field 'poly' in anotherModule.ml.
The problem appear or disappear with the presence or the suppression of an additional method ('cause_trouble' in classedef.mli).
Steps to reproduce
Untar the attached file. Just do "make". The program is 20 line in total on 3 files.
The problem disappear if the method "cause_troubel" is removed or if its type does not involve the parameter of the class.
If the file anotherModule.mli is removed, the problem disappear in 4.00.0+beta2 but persist in 3.11 and 3.12.
I didn't try the trunk version.
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
Fixed in trunk, at revision 13164.
This is a quick hack: I just replaced expand_head_unif by the safe version expand_head in moregeneral and eqtype. Unification will still fail for structural types.
type refer1 = < poly : 'a 'b 'c . (('b, 'c) #Classdef.cl2 as 'a) >
The definition of f still fails for the same reason.
Comment author: @trefis
Could the new