diff --git a/src/NamedTuples.jl b/src/NamedTuples.jl index 016f5fd..df8d967 100644 --- a/src/NamedTuples.jl +++ b/src/NamedTuples.jl @@ -387,7 +387,7 @@ Base.Broadcast.promote_containertype(_, ::Type{NamedTuple}) = error() _map(f, nts...) end -else +elseif VERSION < v"0.7.0-DEV.4955" @inline function Base.Broadcast.broadcast(f, nt::NamedTuple) map(f, nt) diff --git a/test/runtests.jl b/test/runtests.jl index 9655af4..d1ce094 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -72,7 +72,10 @@ y = delete( x, :a) @test merge( nt, @NT( d = "hello", e = "world")) == @NT( a=1,b=2,c=3,d="hello",e="world") -@test get.(@NT( a = Nullable(3), b = Nullable("world") )) == @NT( a = 3, b = "world") +# TODO: Support new broadcasting interface (https://github.com/JuliaLang/julia/pull/26891) +if VERSION < v"0.7.0-DEV.4955" + @test get.(@NT( a = Nullable(3), b = Nullable("world") )) == @NT( a = 3, b = "world") +end @test_throws MethodError @NT( a = 3) .+ [4] @test_throws MethodError [4] .+ @NT( a = 3)