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

infinite loop in object type checking? #6250

Closed
vicuna opened this issue Oct 15, 2002 · 2 comments
Closed

infinite loop in object type checking? #6250

vicuna opened this issue Oct 15, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 15, 2002

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

Bug description

Full_Name: Pierre Boulet
Version: 3.06 and 3.06+8
OS: linux and Win32 cygwin
Submission from: melig.lifl.fr (134.206.11.29)

While compiling the following code, the compiler enters an infinite loop (at
least I believe). It happens both with the bytecode and native code compiler,
both on linux and Win32/cygwin, that's why I believe it's in the type checking
that the bug is.

class virtual duplicatable =

object (_ : 'a)
method virtual dup : 'a
end;;
class virtual duplicatable : object ('a) method virtual dup : 'a end

class color (c_init : string) =

object (self)
inherit duplicatable
val c = c_init
method col = c
method dup = Oo.copy self
end;;

This code has worked OK with versions 3.00 to 3.04 of ocaml.

@vicuna
Copy link
Author

vicuna commented Oct 16, 2002

Comment author: administrator

Fixed in ctype.ml on 2002-10-16 (JG)

@vicuna vicuna closed this as completed Oct 16, 2002
@vicuna
Copy link
Author

vicuna commented Oct 16, 2002

Comment author: administrator

From: Pierre.Boulet@lifl.fr

While compiling the following code, the compiler enters an infinite loop (at
least I believe). It happens both with the bytecode and native code compiler,
both on linux and Win32/cygwin, that's why I believe it's in the
type checking that the bug is.

Thanks for your report.
Indeed an invariant was broken in objects, and I forgot to add the
needed checks.
This is now fixed in typing/ctype.ml.

 Jacques

@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