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

Bad error message "Unbound class" on deprecated syntax #c [> `A] #5983

Closed
vicuna opened this issue Apr 12, 2013 · 2 comments
Closed

Bad error message "Unbound class" on deprecated syntax #c [> `A] #5983

vicuna opened this issue Apr 12, 2013 · 2 comments
Milestone

Comments

@vicuna
Copy link

vicuna commented Apr 12, 2013

Original bug ID: 5983
Reporter: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:24:09Z)
Resolution: open
Priority: normal
Severity: minor
Target version: 4.02.0+dev
Category: typing
Related to: #5936

Bug description

class c = object end;;

class c : object end

module type S = sig val x : #c [> `A] end;;

Error: Unbound class c
Did you mean c?

I believe the syntax "#c [> ...]" is (i) deprecated and (ii) only used to make sense when c is an abbreviation for a polymorphic variant type.

My preference would be to remove the syntax altogether, if possible, and otherwise to report a better error message for the case above.

@vicuna
Copy link
Author

vicuna commented Apr 15, 2013

Comment author: @damiendoligez

This syntax is undocumented. I'll try removing it and see if it breaks something, and report in the discussion of #5936

@vicuna
Copy link
Author

vicuna commented Apr 29, 2013

Comment author: @alainfrisch

Setting Target Version = 4.02 (already fixed in extension_points, which will hopefully be merged in time for 4.02).

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the typing label Mar 14, 2019
@vicuna vicuna added this to the 4.02.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant