# 0.7: Changes in method specificity

**URL:** <https://discourse.julialang.org/t/0-7-changes-in-method-specificity/13519>\
**Category:** General Usage\
**Created:** [August 15, 2018, 7:00pm UTC](https://discourse.julialang.org/t/0-7-changes-in-method-specificity/13519 "2018-08-15T19:00:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![galenlynch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/galenlynch/32/17947_2.png) [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Post date:** [August 15, 2018, 7:00pm UTC](https://discourse.julialang.org/t/0-7-changes-in-method-specificity/13519/1 "2018-08-15T19:00:21Z")

</div>

in 0.6, the following code is fine:

```julia
julia> foo(::AbstractVector{E}, ::NTuple{2, E}) where E = true # A
julia> foo(::AbstractVector{E}, ::NTuple{2, <:Any}) where E = false # B
julia> foo([1, 2], (3, 4))
true

```

However, in 0.7 it leads to method ambiguity:

```julia
# same functions declared
julia> foo([1, 2], (3, 4))
ERROR: MethodError: foo(::Array{Int64,1}, ::Tuple{Int64,Int64}) is ambiguous. Candidates:
  foo(::AbstractArray{E,1}, ::Tuple{#s1,#s1} where #s1) where E in Main at REPL[22]:1
  foo(::AbstractArray{E,1}, ::Tuple{E,E}) where E in Main at REPL[21]:1
Possible fix, define
  foo(::AbstractArray{E,1}, ::Tuple{#s1,#s1} where #s1<:E)
Stacktrace:
 [1] top-level scope at none:0

```

I’m also not sure I get it: the first method (A) seems like it should always be more specific, even if the tuple elements are a subtype of the array elements.
