Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast regression #24944

Closed
maleadt opened this issue Dec 6, 2017 · 0 comments
Closed

Broadcast regression #24944

maleadt opened this issue Dec 6, 2017 · 0 comments
Labels
broadcast Applying a function over a collection bug Indicates an unexpected problem or unintended behavior

Comments

@maleadt
Copy link
Member

maleadt commented Dec 6, 2017

Bisected to 7c7f6ef #23939 (cc @timholy).

Before:

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2634 (2017-11-26 10:26 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 3c1e9d06e8* (10 days old master)
|__/                   |  x86_64-pc-linux-gnu

julia> n = 1
1

julia> n ./ (1,)
(1.0,)

julia> ceil.(Int, n ./ (1,))
(1,)

After:

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2635 (2017-11-26 11:12 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 7c7f6ef82c* (10 days old master)
|__/                   |  x86_64-pc-linux-gnu

julia> n = 1
1

julia> n ./ (1,)
(1.0,)

julia> ceil.(Int, n ./ (1,))
ERROR: MethodError: no method matching longest_tuple(::Type{Int64}, ::Int64, ::Tuple{Int64})
Closest candidates are:
  longest_tuple(::Any, ::Tuple, ::Any...) at broadcast.jl:646
  longest_tuple(::Tuple, ::Any, ::Any...) at broadcast.jl:647
  longest_tuple(::Tuple, ::Tuple, ::Any...) at broadcast.jl:645
Stacktrace:
 [1] broadcast(::Function, ::Base.Broadcast.Style{Tuple}, ::Void, ::Void, ::Type, ::Int64, ::Vararg{Any,N} where N) at ./broadcast.jl:639
 [2] broadcast(::Function, ::Type, ::Int64, ::Tuple{Int64}) at ./broadcast.jl:578
 [3] top-level scope

But still works without the variable:

julia> ceil.(Int, 1 ./ (1,))
(1,)
@nalimilan nalimilan added broadcast bug Indicates an unexpected problem or unintended behavior labels Dec 6, 2017
@mbauman mbauman added the broadcast Applying a function over a collection label Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants