Permalink
Browse files

fix #2169

  • Loading branch information...
JeffBezanson committed Feb 3, 2013
1 parent 4ecc5fc commit beb277b8086a0938d2fb84c95e34f69bdd319890
Showing with 11 additions and 2 deletions.
  1. +4 −1 src/gf.c
  2. +7 −1 test/core.jl
View
@@ -1437,7 +1437,10 @@ jl_value_t *jl_gf_invoke(jl_function_t *gf, jl_tuple_t *types,
newsig = (jl_tuple_t*)m->sig;
if (env != (jl_value_t*)jl_false) {
- tpenv = (jl_tuple_t*)env;
+ jl_value_t *ti =
+ lookup_match((jl_value_t*)tt, (jl_value_t*)m->sig, &tpenv, m->tvars);
+ assert(ti != (jl_value_t*)jl_bottom_type);
+ (void)ti;
// don't bother computing this if no arguments are tuples
for(i=0; i < jl_tuple_len(tt); i++) {
if (jl_is_tuple(jl_tupleref(tt,i)))
View
@@ -608,5 +608,11 @@ end
let
i2161_1() = promote(2,2,2.0,2)
i2161_2() = i2161_1()[1]
- @test i2161_2() == 2
+ @test i2161_2() === 2.0
+end
+
+# issue #2169
+let
+ i2169{T}(a::Array{T}) = typemin(T)
+ @test invoke(i2169,(Array,),Int8[1]) === int8(-128)
end

0 comments on commit beb277b

Please sign in to comment.