Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias failure on open polymorphic variants. #4458

Closed
vicuna opened this issue Nov 29, 2007 · 1 comment
Closed

Alias failure on open polymorphic variants. #4458

vicuna opened this issue Nov 29, 2007 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 29, 2007

Original bug ID: 4458
Reporter: jm
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2010-04-29T12:26:04Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #4556

Bug description

% cat t.ml
type s = [`A]
type 'a t = { a : [> s ] as 'a }
% ocamlc -i t.ml
File "t.ml", line 2, characters 18-23:
Unbound type parameter ..

A work-around may be:
% cat tt.ml
type s = [A] type 'a t = { a : 'a } constraint 'a = [> s ] % ocamlc -i t.ml type s = [ A ]
type 'a t = { a : 'a; } constraint 'a = [> s ]

Additional information

AFAICS this bug appears with the fix for #4350.

@vicuna
Copy link
Author

vicuna commented Nov 30, 2007

Comment author: @garrigue

This is not a bug: in type definitions constraints must be introduced explictly through the "constraint" keyword.
This was already the case in 3.09.
The bug is rather that 3.10.0 allowed implicit introduction of constraints.
Sorry for the confusion this created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants