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

Polymorphic Invariant Compilation #8185

Closed
vicuna opened this issue Jun 25, 2003 · 1 comment
Closed

Polymorphic Invariant Compilation #8185

vicuna opened this issue Jun 25, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 25, 2003

Original bug ID: 1728
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Bow-Yaw Wang
Version: 3.06+36 (2003-06-19)
OS: Mac OS X
Submission from: 140.109.21.73 (140.109.21.73)

I'm trying to implement visitor pattern with polymorphic
variants (Jacques, thanks :)). Here are the files and transcript:

a.mli:
class a :
object ('o)
method invite : 'c 'v . (([>`A of 'o] as 'c) -> 'v) -> 'v
end

a.ml:
class a =
object (self : 'o)
method invite : 'c 'v . (([>A of 'o] as 'c) -> 'v) -> 'v = fun f -> f (A self)
end

dhcp066:$ocamlc -c a.mli
dhcp066:
$ocamlc -c a.ml
Fatal error: exception Assert_failure("typing/btype.ml", 202, 26)

If I type the definition of class a interactively, it compiles without
any problem.

Sorry for not using the stable version. I hope the latest cvs
version can do.

Thanks,

Bow-Yaw

@vicuna
Copy link
Author

vicuna commented Jun 26, 2003

Comment author: administrator

See #8184

@vicuna vicuna closed this as completed Jun 26, 2003
@vicuna vicuna added the bug label Mar 19, 2019
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

1 participant