Merge pull request #471 from FluxML/kf/broadcastvcheck

Add VERSION check around broadcast piracy
This commit is contained in:
Mike J Innes 2018-10-29 15:20:10 +00:00 committed by GitHub
commit 59cfe3e891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,6 +434,7 @@ end
using Requires
# https://github.com/FluxML/Flux.jl/issues/353
if VERSION < v"1.1.0-DEV.548"
@init Requires.isprecompiling() || @eval Base.Broadcast begin
function flatten(bc::Broadcasted{Style}) where {Style}
isflat(bc) && return bc
@ -459,3 +460,4 @@ using Requires
end
end
end
end