Skip to content

Commit 139bec4

Browse files
committed
allow min and max in guard tests
1 parent 1ab6cdc commit 139bec4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ defmodule Kernel do
972972
comparison"](#module-structural-comparison) section
973973
for more information.
974974
975-
Inlined by the compiler.
975+
Allowed in guard tests. Inlined by the compiler.
976976
977977
## Examples
978978
@@ -982,6 +982,7 @@ defmodule Kernel do
982982
"b"
983983
984984
"""
985+
@doc guard: true
985986
@spec max(first, second) :: first | second when first: term, second: term
986987
def max(first, second) do
987988
:erlang.max(first, second)
@@ -998,7 +999,7 @@ defmodule Kernel do
998999
comparison"](#module-structural-comparison) section
9991000
for more information.
10001001
1001-
Inlined by the compiler.
1002+
Allowed in guard tests. Inlined by the compiler.
10021003
10031004
## Examples
10041005
@@ -1008,6 +1009,7 @@ defmodule Kernel do
10081009
"bar"
10091010
10101011
"""
1012+
@doc guard: true
10111013
@spec min(first, second) :: first | second when first: term, second: term
10121014
def min(first, second) do
10131015
:erlang.min(first, second)

0 commit comments

Comments
 (0)