Skip to content

Commit

Permalink
add tests for #11840 TypeConstructor gf cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Aug 25, 2015
1 parent fea2000 commit 8ac4fe6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,26 @@ let T = TypeVar(:T, Tuple{Vararg{RangeIndex}}, true)
@test args_morespecific(t2, t1)
end

# issue #11840
f11840(::Type) = "Type"
f11840(::DataType) = "DataType"
@test f11840(Type) == "DataType"
@test f11840(AbstractVector) == "Type"

g11840(::DataType) = 1
g11840(::Type) = 2
@test g11840(Vector.body) == 1
@test g11840(Vector) == 2
@test g11840(Vector.body) == 1

h11840(::DataType) = '1'
h11840(::Type) = '2'
h11840(::TypeConstructor) = '3'
@test h11840(Vector) == '3'
@test h11840(Vector.body) == '1'
@test h11840(Vector) == '3'


# join
@test typejoin(Int8,Int16) === Signed
@test typejoin(Int,AbstractString) === Any
Expand Down

0 comments on commit 8ac4fe6

Please sign in to comment.