It seems like i missed something about multiple dispatch + parametric types:
Integer is an abstract supertype of all integer types, so the method f(arg::Integer)
works as expected:
f(arg::Integer) = println("an integer")
# f(42) prints "an integer"
# f(UInt8(42)) prints "an integer"
But if i you try the same with an one-dimensional Array of Integers as an argument type, julia answers with an error message:
f(arg::Array{Integer, 1}) = println("an array with integers")
f(arg::Array{Signed, 1}) = println("an array with signed integers")
# f([1,2,3]) gives "no method matching f(::Array{Int64,1})..."
Any idea what is wrong here? – Thanks in advance!