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

Fatal error: Stack_overflow while printing typing error message #3705

Closed
vicuna opened this issue Jun 26, 2005 · 2 comments
Closed

Fatal error: Stack_overflow while printing typing error message #3705

vicuna opened this issue Jun 26, 2005 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 26, 2005

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

Bug description

Full_Name: Ethan Aubin
Version: 3.08.3
OS: linux
Submission from: c-24-60-21-144.hsd1.ma.comcast.net (24.60.21.144)

(* Hi, The following code prints the following, then dies

class ['a] redButton = object (self : 'a redButtonTy)
^^^^^^^^^^^^^^^^^^^^^^^
This pattern cannot match self: it only matches values of type Fatal error:
exception Stack_overflow

*)

class virtual ['a] widget = object
method virtual raw : 'a
end

class type ['a] button = object
constraint 'a = [> ]
method press : unit
method raw : 'a
end

class ['a] button = object (self)
inherit ['a] widget
method raw = `Button (self :> 'foo button)
method press = prerr_endline "pressed"
end

class type ['a] redButtonIntf =
object
constraint 'a = [> `RedButton of 'a redButtonIntf ]
method light : unit
method press : unit
method raw : 'a
end

class ['a] redButton = object (self : 'a redButtonIntf)
inherit ['a] button
method raw = `RedButton self
method light = prerr_endline "button lit"
end

@vicuna
Copy link
Author

vicuna commented Jul 12, 2005

Comment author: administrator

Hi, The following code prints the following, then dies

class ['a] redButton = object (self : 'a redButtonTy)
^^^^^^^^^^^^^^^^^^^^^^^
This pattern cannot match self: it only matches values of type Fatal error:
exception Stack_overflow

Indeed, there was a stupid bug in the error reporting code specific to this
case.
Of course, this doesn't make your code less wrong :-)

This now fixed in CVS 3.08.4 and 3.09.

Jacques

@vicuna
Copy link
Author

vicuna commented Jul 12, 2005

Comment author: administrator

Fixed in typeclass.ml / CVS 3.08.4+3.09 by JG (2005-07-12)

@vicuna vicuna closed this as completed Jul 12, 2005
@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