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

Spurious warning 38 (exception … is never used to build values) with exception alias #7897

Closed
vicuna opened this issue Jan 17, 2019 · 1 comment · Fixed by #9537
Closed
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 17, 2019

Original bug ID: 7897
Reporter: copy
Status: new
Resolution: open
Priority: normal
Severity: minor
Version: 4.07.1
Category: typing
Monitored by: @nojb @gasche @hcarty

Bug description

Warning 38 is thrown for exception aliases that aren't raised in the same file. The warning is invalid since a value containing this exception might be raised in another file.

Steps to reproduce

$ cat test.ml
exception Bar = Pervasives.Exit
let is_bar = function Bar -> true | _ -> false

$ cat test.mli
val is_bar : exn -> bool

$ ocamlbuild -tag 'warn(+a)' test.native
File "test.ml", line 1, characters 0-31:
Warning 38: exception Bar is never used to build values.
(However, this constructor appears in patterns.)

@vicuna vicuna added the typing label Mar 14, 2019
@github-actions
Copy link

github-actions bot commented May 6, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 6, 2020
@lpw25 lpw25 self-assigned this May 6, 2020
@lpw25 lpw25 removed the Stale label May 6, 2020
Octachron added a commit that referenced this issue Jun 26, 2020
Fix warning 38 for rebound extension constructors (#7897)
Octachron added a commit that referenced this issue Jun 26, 2020
Fix warning 38 for rebound extension constructors (#7897)

(cherry picked from commit da0e9ed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants