diff --git a/NEWS.md b/NEWS.md index 18aea199cd635..4f1e23c476185 100644 --- a/NEWS.md +++ b/NEWS.md @@ -78,6 +78,7 @@ Standard library changes * `range` now accept `stop` as a positional argument ([#28708]). * `parse(Bool, str)` is now supported ([#29997]). * `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]). + * In `put!(c::Channel{T}, v)`, `v` now gets converted to `T` as `put!` is being called ([#29092]). Compiler/Runtime improvements ----------------------------- diff --git a/base/channels.jl b/base/channels.jl index f43d74f75c921..090fad3ad877f 100644 --- a/base/channels.jl +++ b/base/channels.jl @@ -245,6 +245,9 @@ Append an item `v` to the channel `c`. Blocks if the channel is full. For unbuffered channels, blocks until a [`take!`](@ref) is performed by a different task. + +!!! compat "Julia 1.1" + `v` now gets converted to the channel's type with [`convert`](@ref) as `put!` is called. """ function put!(c::Channel{T}, v) where T check_channel_state(c)