-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove warning 30 from the standard set.
Warning 30 (same constructor/label name used in two mutually-recursive declarations) is an annoying warning that makes no sense since we introduced type-based disambiguation of fields and constructors. It was disabled by default in OCaml 4.10 ocaml/ocaml#9046 and there is no reason to keep it in Dune. Signed-off-by: Gabriel Scherer <gabriel.scherer@gmail.com> Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
- Loading branch information
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Remove warning 30 from default set for projects where dune lang is at least | ||
3.13 (#9568, @gasche) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$ cat >dune <<EOF | ||
> (library | ||
> (modes byte) | ||
> (name foo)) | ||
> EOF | ||
|
||
$ cat >foo.ml <<EOF | ||
> type a = { a : int } | ||
> and b = { a : int ; b : bool } | ||
> EOF | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.12) | ||
> EOF | ||
$ dune build foo.cma | ||
File "foo.ml", line 2, characters 10-19: | ||
2 | and b = { a : int ; b : bool } | ||
^^^^^^^^^ | ||
Error (warning 30 [duplicate-definitions]): the label a is defined in both types a and b. | ||
[1] | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.13) | ||
> EOF | ||
$ dune build foo.cma |