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

deprecated attribute not properly interpreted on modules #7064

Closed
vicuna opened this issue Nov 27, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Nov 27, 2015

Original bug ID: 7064
Reporter: @alainfrisch
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2017-02-16T14:18:37Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Related to: #6711
Monitored by: @diml @hcarty

Bug description

I think the following used to trigger a warning:

module X = ...
[@@ocaml.deprecated]

module Y = X

This is probably related to the introduction of module aliases.

In addition to fixing that, "deprecated" on modules should be improved in the following direction:

  • When the declaration for X has been marked as deprecated, accessing any of its field (X.x) should raise the warning.

  • It should be possible to specify the deprecated attribute for the implicit declaration resulting from a compilation unit. The most natural way is to interpreted a floating attribute [@@@ocaml.deprecated] at the top of the .mli (or .ml if there is no .mli), i.e. before any other non-attribute signature item.

This would allow to mark some stdlib modules as being deprecated (#6711).

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 2, 2015

Comment author: @alainfrisch

#316

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 2, 2015

Comment author: @alainfrisch

Merged to trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.