Skip to content

Commit cba2e15

Browse files
committed
rename where_constraint
1 parent ecf6bb5 commit cba2e15

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/method.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function name_of_type(x::UnionAll)
103103
# `foo{T,A} where {T, A}`` rather than the longer: `(foo{T,A} where T) where A`
104104
where_params = []
105105
while x isa UnionAll
106-
push!(where_params, where_parameter1(x.var))
106+
push!(where_params, where_constraint(x.var))
107107
x = x.body
108108
end
109109

@@ -132,8 +132,7 @@ function arguments(m::Method)
132132
end
133133
end
134134

135-
# type-vars can only show up attached to UnionAlls.
136-
function where_parameter1(x::TypeVar)
135+
function where_constraint(x::TypeVar)
137136
if x.lb === Union{} && x.ub === Any
138137
return x.name
139138
elseif x.lb === Union{}
@@ -150,7 +149,7 @@ where_parameters(sig) = nothing
150149
function where_parameters(sig::UnionAll)
151150
whereparams = []
152151
while sig isa UnionAll
153-
push!(whereparams, where_parameter1(sig.var))
152+
push!(whereparams, where_constraint(sig.var))
154153
sig = sig.body
155154
end
156155
return whereparams

0 commit comments

Comments
 (0)