Permalink
Browse files

fix #6050

  • Loading branch information...
1 parent f87569b commit c70109fe57e4a0725eeaf3d097291502e5ea5dd4 @JeffBezanson JeffBezanson committed Mar 4, 2014
Showing with 7 additions and 1 deletion.
  1. +2 −1 base/inference.jl
  2. +5 −0 test/core.jl
View
3 base/inference.jl
@@ -377,7 +377,8 @@ const getfield_tfunc = function (A, s0, name)
end
for i=1:length(s.names)
if is(s.names[i],fld)
- return limit_type_depth(s.types[i], 0, true, {s.parameters...})
+ return limit_type_depth(s.types[i], 0, true,
+ filter!(x->isa(x,TypeVar), {s.parameters...}))
end
end
return None
View
5 test/core.jl
@@ -1418,3 +1418,8 @@ end
macro m6031(x); x; end
@test @m6031([2,4,6])[3] == 6
@test (@m6031 [2,4,6])[2] == 4
+
+# issue #6050
+@test Base.getfield_tfunc({nothing,QuoteNode(:vals)},
+ Dict{Int64,(Range1{Int64},Range1{Int64})},
+ :vals) == Array{(Range1{Int64},Range1{Int64}),1}

0 comments on commit c70109f

Please sign in to comment.