I think it's an error. The method definition should probably just be: linreg{T<:Number,S<:Number}(X::AbstractVector{T}, y::AbstractVector{S}) = [ones(T, size(X,1)) X] \ y
which will allow it to work for X and y of different types. A PR (pull request) with a patch and a test case would be most welcome.