the following is not at all important. I know it works if the Point initializer method is outside the function. this is pure curiosity. why would the following not work?
mutable struct Point; x::Float64; end#struct
function x()
Point(x::Int) = Point( Float64(x) )
isindomain( p::Point )= (!isinf(p.x))
println(isindomain(Point(2)) && "we are all good")
end
the error message seems pretty bad, though.
ERROR: LoadError: type DataType has no field contents
took me a while to figure out what the problem was. if initializers in general are not allowed inside functions, then it could probably give a more descriptive error.