-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Type-unstable code when using broadcasting #24186
Labels
Comments
kshyatt
added
types and dispatch
Types, subtyping and method dispatch
broadcast
Applying a function over a collection
labels
Oct 19, 2017
Duplicate of #22255 |
JeffBezanson
added
compiler:inference
Type inference
broadcast
and removed
types and dispatch
Types, subtyping and method dispatch
labels
Apr 4, 2018
I don't think this is a duplicate of #22255, this issue is still there on Julia master. julia> versioninfo()
Julia Version 0.7.0-beta.206
Commit b6f9244d6b (2018-07-08 19:42 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
julia> @code_warntype foo()
Body::Any
2 1 ── Base.ifelse(true, 4, 0) │╻╷╷ Colon
│ %2 = new(UnitRange{Int64}, 1, 4)::UnitRange{Int64} ││┃ Type
│ %3 = Base.slt_int(4, 1)::Bool ││╻╷╷╷ iterate
└─── goto 3 if not %3 │││
2 ── goto 4 │││
3 ── goto 4 │││
4 ┄─ %7 = φ (2 => true, 3 => false)::Bool ││
│ %8 = φ (3 => 1)::Int64 ││
│ %9 = φ (3 => 1)::Int64 ││
└─── goto 6 if not %7 ││
5 ── %11 = invoke Base.BoundsError(%2::Any, 1::Int64)::BoundsError ││
│ Base.throw(%11) ││
└─── unreachable ││
6 ── goto 7 ││
7 ── %15 = Base.:===(%9, 4)::Bool ││╻╷ iterate
└─── goto 9 if not %15 │││
8 ── goto 10 │││
9 ── %18 = Base.add_int(%9, 1)::Int64 │││╻ +
└─── goto 10 ││╻ iterate
10 ┄ %20 = φ (8 => true, 9 => false)::Bool ││
│ %21 = φ (9 => %18)::Int64 ││
│ %22 = φ (9 => %18)::Int64 ││
└─── goto 12 if not %20 ││
11 ─ %24 = invoke Base.BoundsError(%2::Any, 2::Int64)::BoundsError ││
│ Base.throw(%24) ││
└─── unreachable ││
12 ─ goto 13 ││
13 ─ %28 = Base.:===(%22, 4)::Bool ││╻╷ iterate
└─── goto 15 if not %28 │││
14 ─ goto 16 │││
15 ─ %31 = Base.add_int(%22, 1)::Int64 │││╻ +
└─── goto 16 ││╻ iterate
16 ┄ %33 = φ (14 => true, 15 => false)::Bool ││
│ %34 = φ (15 => %31)::Int64 ││
│ %35 = φ (15 => %31)::Int64 ││
└─── goto 18 if not %33 ││
17 ─ %37 = invoke Base.BoundsError(%2::Any, 3::Int64)::BoundsError ││
│ Base.throw(%37) ││
└─── unreachable ││
18 ─ goto 19 ││
19 ─ %41 = Base.:===(%35, 4)::Bool ││╻╷ iterate
└─── goto 21 if not %41 │││
20 ─ goto 22 │││
21 ─ %44 = Base.add_int(%35, 1)::Int64 │││╻ +
└─── goto 22 ││╻ iterate
22 ┄ %46 = φ (20 => true, 21 => false)::Bool ││
│ %47 = φ (21 => %44)::Int64 ││
└─── goto 24 if not %46 ││
23 ─ %49 = invoke Base.BoundsError(%2::Any, 4::Int64)::BoundsError ││
│ Base.throw(%49) ││
└─── unreachable ││
24 ─ goto 25 ││
3 25 ─ %53 = π (:($(QuoteNode([1]))), SArray{Tuple{1},Int64,1,1}) │╻ broadcasted
│ %54 = Core.tuple(%53, %8)::Tuple{SArray{Tuple{1},Int64,1,1},Int64} ││
│ %55 = :(Base.Broadcast.Core)::Module ││╻╷ broadcasted
│ Base.getfield(%55, :Typeof) │││┃││ Type
│ %57 = new(Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}, *, %54, nothing)::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}
│ %58 = π (:($(QuoteNode([2]))), SArray{Tuple{1},Int64,1,1}) │╻ broadcasted
│ %59 = Core.tuple(%58, %21)::Tuple{SArray{Tuple{1},Int64,1,1},Int64} ││
│ %60 = :(Base.Broadcast.Core)::Module ││╻╷ broadcasted
│ Base.getfield(%60, :Typeof) │││┃││ Type
│ %62 = new(Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}, *, %59, nothing)::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}
│ %63 = π (:($(QuoteNode([3]))), SArray{Tuple{1},Int64,1,1}) │╻ broadcasted
│ %64 = Core.tuple(%63, %34)::Tuple{SArray{Tuple{1},Int64,1,1},Int64} ││
│ %65 = :(Base.Broadcast.Core)::Module ││╻╷ broadcasted
│ Base.getfield(%65, :Typeof) │││┃││ Type
│ %67 = new(Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}, *, %64, nothing)::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}
│ %68 = π (:($(QuoteNode([4]))), SArray{Tuple{1},Int64,1,1}) │╻ broadcasted
│ %69 = Core.tuple(%68, %47)::Tuple{SArray{Tuple{1},Int64,1,1},Int64} ││
│ %70 = :(Base.Broadcast.Core)::Module ││╻╷ broadcasted
│ Base.getfield(%70, :Typeof) │││┃││ Type
│ %72 = new(Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}, *, %69, nothing)::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}
│ %73 = Core.tuple(%57, %62, %67, %72)::NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}
│ %74 = :(Base.Broadcast.Core)::Module ││╻╷ broadcasted
│ Base.getfield(%74, :Typeof) │││┃││ Type
│ Base.ifelse(false, 0, 1) ││╻╷╷╷╷╷╷╷╷╷╷╷ instantiate
│ %77 = new(Base.OneTo{Int64}, 1)::Base.OneTo{Int64} │││┃│││││││││ combine_axes
│ Base.ifelse(false, 0, 1) ││││╻╷╷╷╷╷╷╷╷╷ combine_axes
│ %79 = new(Base.OneTo{Int64}, 1)::Base.OneTo{Int64} │││││┃││││││││ broadcast_axes
│ Base.ifelse(false, 0, 1) ││││││╻╷╷╷╷╷╷╷╷╷ broadcast_axes
│ %81 = new(Base.OneTo{Int64}, 1)::Base.OneTo{Int64} │││││││┃│││││││ axes
│ Base.ifelse(false, 0, 1) │││││││╻╷╷╷╷╷╷╷╷╷ broadcast_axes
│ %83 = new(Base.OneTo{Int64}, 1)::Base.OneTo{Int64} ││││││││┃│││││││ axes
│ %84 = Base.:===(1, 1)::Bool │││││││╻╷╷╷╷ _bcs
│ %85 = Base.and_int(true, %84)::Bool ││││││││╻ _bcs1
└─── goto 27 if not %85 │││││││││┃ _bcsm
26 ─ goto 28 ││││││││││
27 ─ goto 28 ││││││││││
28 ┄ %89 = φ (26 => %85, 27 => true)::Bool │││││││││
└─── goto 30 if not %89 │││││││││
29 ─ goto 36 │││││││││
30 ─ %92 = Base.:===(1, 1)::Bool ││││││││││╻╷ ==
│ %93 = Base.and_int(true, %92)::Bool │││││││││││╻ &
└─── goto 32 if not %93 ││││││││││
31 ─ goto 33 ││││││││││
32 ─ goto 33 ││││││││││
33 ┄ %97 = φ (31 => %93, 32 => true)::Bool │││││││││
└─── goto 35 if not %97 │││││││││
34 ─ goto 36 │││││││││
35 ─ %100 = new(Base.DimensionMismatch, "arrays could not be broadcast to a common size")::DimensionMismatch Type
│ Base.Broadcast.throw(%100) │││││││││
└─── unreachable │││││││││
36 ┄ %103 = φ (29 => true, 34 => true)::Bool ││││││││
│ %104 = φ (29 => true, 34 => true)::Bool ││││││││
│ %105 = φ (29 => true, 34 => true)::Bool ││││││││
│ %106 = φ (29 => true, 34 => true)::Bool ││││││││
│ %107 = φ (29 => true, 34 => true)::Bool ││││││││
│ %108 = φ (29 => true, 34 => true)::Bool ││││││││
│ %109 = φ (29 => %83, 34 => %81)::Base.OneTo{Int64} ││││││││
└─── goto 37 ││││││││
37 ─ goto 38 │││││││
38 ─ goto 39 ││││││
39 ─ %113 = Base.and_int(true, %103)::Bool ││││││╻╷╷╷╷ _bcs
└─── goto 41 if not %113 │││││││┃│ _bcs1
40 ─ goto 42 ││││││││┃ _bcsm
41 ─ goto 42 │││││││││
42 ┄ %117 = φ (40 => %113, 41 => true)::Bool ││││││││
└─── goto 44 if not %117 ││││││││
43 ─ goto 50 ││││││││
44 ─ %120 = Base.and_int(true, %104)::Bool │││││││││╻╷ ==
└─── goto 46 if not %120 │││││││││
45 ─ goto 47 │││││││││
46 ─ goto 47 │││││││││
47 ┄ %124 = φ (45 => %120, 46 => %105)::Bool ││││││││
└─── goto 49 if not %124 ││││││││
48 ─ goto 50 ││││││││
49 ─ %127 = new(Base.DimensionMismatch, "arrays could not be broadcast to a common size")::DimensionMismatch Type
│ Base.Broadcast.throw(%127) ││││││││
└─── unreachable ││││││││
50 ┄ %130 = φ (43 => %106, 48 => true)::Bool │││││││
│ %131 = φ (43 => %107, 48 => true)::Bool │││││││
│ %132 = φ (43 => %108, 48 => true)::Bool │││││││
│ %133 = φ (43 => %109, 48 => %79)::Base.OneTo{Int64} │││││││
└─── goto 51 │││││││
51 ─ goto 52 ││││││
52 ─ goto 53 │││││
53 ─ %137 = Base.and_int(true, %130)::Bool │││││╻╷╷╷╷ _bcs
└─── goto 55 if not %137 ││││││┃│ _bcs1
54 ─ goto 56 │││││││┃ _bcsm
55 ─ goto 56 ││││││││
56 ┄ %141 = φ (54 => %137, 55 => true)::Bool │││││││
└─── goto 58 if not %141 │││││││
57 ─ goto 64 │││││││
58 ─ %144 = Base.and_int(true, %131)::Bool ││││││││╻╷ ==
└─── goto 60 if not %144 ││││││││
59 ─ goto 61 ││││││││
60 ─ goto 61 ││││││││
61 ┄ %148 = φ (59 => %144, 60 => %132)::Bool │││││││
└─── goto 63 if not %148 │││││││
62 ─ goto 64 │││││││
63 ─ %151 = new(Base.DimensionMismatch, "arrays could not be broadcast to a common size")::DimensionMismatch Type
│ Base.Broadcast.throw(%151) │││││││
└─── unreachable │││││││
64 ┄ %154 = φ (57 => %133, 62 => %77)::Base.OneTo{Int64} ││││││
│ %155 = Core.tuple(%154)::Tuple{Base.OneTo{Int64}} ││││││
└─── goto 65 ││││││
65 ─ goto 66 │││││
66 ─ goto 67 ││││
67 ─ %159 = :(Base.Broadcast.Core)::Module │││╻ Type
│ Base.getfield(%159, :Typeof) ││││╻ getproperty
│ %161 = new(Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}}, +, %73, %155)::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}}
└─── goto 68 │││
68 ─ %163 = :(StaticArrays.Broadcast)::Module ││╻ copy
│ %164 = Base.getfield(%163, :flatten)::typeof(Base.Broadcast.flatten) │││╻ getproperty
│ %165 = invoke %164(%161::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}})::Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},getfield(Base.Broadcast, Symbol("##2#4")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}},getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##5#6"))}}}}}}}}}}}}},_1} where _1
│ %166 = Base.getfield(%165, :args)::Any │││╻ getproperty
│ %167 = Base.getfield(%165, :f)::getfield(Base.Broadcast, Symbol("##2#4")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}},getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##5#6"))}}}}}}}}}}}}}
│ %168 = Core._apply(StaticArrays.broadcast_sizes, %166)::Tuple ││╻ copy
│ %169 = StaticArrays.combine_sizes(%168)::Any │││
│ %170 = Core.tuple(%167, %169, %168)::Tuple{getfield(Base.Broadcast, Symbol("##2#4")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),NTuple{4,Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}}}},getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##9#10")){Base.Broadcast.Broadcasted{StaticArrays.StaticArrayStyle{1},Nothing,typeof(*),Tuple{SArray{Tuple{1},Int64,1,1},Int64}},getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##11#12")){getfield(Base.Broadcast, Symbol("##13#14"))}},getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##15#16")){getfield(Base.Broadcast, Symbol("##17#18"))}},getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##7#8")){getfield(Base.Broadcast, Symbol("##5#6"))}}}}}}}}}}}}},Any,Tuple}
│ %171 = Core._apply(StaticArrays._broadcast, %170, %166)::Any │││
└─── goto 69 ││
69 ─ return %171 |
I don't know when this was fixed, but I can't reproduce this any more on Julia 1.1.1 nor on master (8ebe564). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
In Julia master (but not in Julia 0.6) this apparently harmless function:
is type-unstable:
It is instead stable if broadcast is not used (remove the
@.
):First reported at JuliaArrays/StaticArrays.jl#321.
The text was updated successfully, but these errors were encountered: