Skip to content

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

@vicuna

Description

@vicuna

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions