Skip to content

Behaviour of flatten_fields and various functions in presence of object indexes. #5428

@vicuna

Description

@vicuna

Original bug ID: 5428
Reporter: @garrigue
Assigned to: @garrigue
Status: assigned (set by @garrigue on 2011-12-15T02:38:31Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.13.0+dev
Target version: later
Category: typing
Tags: typing, gadts
Parent of: #5425 #5427

Bug description

Due to the introduction of object indexes for GADTs, the row variable of an object may now be an expansible type abbreviation.
A first consequence is that flatten_fields will not completely flatten the object, since the type abbreviation will not be expanded (flatten_fields does not receive the current environment).
Another consequence is that various functions may be called with the expansion of this type abbreviation, which is a Tfield, e.g. during printing.
Concrete problems have been fixed, but new bugs may appear in the future.
(Test cases were added to typing-gadts/test.ml)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions