JuliaLang/julia — Issue #344: these signatures are not matched correctly
Author: JeffBezanson
Created: 2012-01-17 22:13:14+00:00
State: open
Labels: bugs

Stefan found this a while ago. These two signatures:

```
assign{K,V}(h::HashTable{K,V}, v::V, key::K)
assign{K,V}(h::HashTable{K,V}, v, k) = assign(h, convert(V,v), convert(K,k))
```

are not dispatched correctly. I believe the second one called itself.

The root of the problem is that `jl_type_match` doesn't handle invariant vs. covariant contexts correctly, unlike type intersection.