Not sure if anyone else has (perhaps poorly conceived, but used to work)
code like this:
function dotest{T}(x::T)
subf(x2::T)=println(x, ", ", x2)
subf(one(x))
end
dotest(1.1)
(reduced from a more complicated construction, in which "subf" is mapped
onto multiple arrays.) Some change in the latest master causes this code to
give "LoadError: UndefVarError: T not defined" even though e.g.
function dotest{T}(x::T)
println(T)
end
dotest(1.1)
works fine. Evidently function construction like this should use anonymous
functions going forward, but does anyone have pointers on how to write
performant code using this type of pattern that works across Julia versions?
Thanks,
Max