The problem is that Julia doesn't have a type-promotion rule for this. In particular:
Base.promote_op(Base.DotAddFun(), Int, Array{Int64,1})
returns Any. This probably be fixed by adding appropriate new promote_op
methods to Base (pull requests are welcome).
