Relax upper bound of T for minBy and maxBy to be nullable.
Swap type parameters of minBy and maxBy. #KT-10099 Fixed
This commit is contained in:
@@ -181,8 +181,8 @@ fun aggregates(): List<GenericFunction> {
|
||||
inline(true)
|
||||
|
||||
doc { f -> "Returns the first ${f.element} yielding the smallest value of the given function or `null` if there are no ${f.element.pluralize()}." }
|
||||
typeParam("T")
|
||||
typeParam("R : Comparable<R>")
|
||||
typeParam("T : Any")
|
||||
returns("T?")
|
||||
body {
|
||||
"""
|
||||
@@ -287,8 +287,8 @@ fun aggregates(): List<GenericFunction> {
|
||||
inline(true)
|
||||
|
||||
doc { f -> "Returns the first ${f.element} yielding the largest value of the given function or `null` if there are no ${f.element.pluralize()}." }
|
||||
typeParam("T")
|
||||
typeParam("R : Comparable<R>")
|
||||
typeParam("T : Any")
|
||||
returns("T?")
|
||||
body {
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user