Per the v0.7 what’s new:
The fallback constructor that calls convert is deprecated. Instead, new types should prefer to define constructors, and add convert methods that call those constructors only as necessary
What’s the recommended way to refactor code which relies on this behavior. Take this simple example - how should it be rewritten?
import Base.convert
struct Continent
name::String
end
struct Country
name::String
continents::Vector{Continent}
end
convert(Continent, x::String) = Continent(x)
c = Country("Turkey", ["Europe", "Asia"])
Thanks!