I don’t understand why my function s1type works as expected but the same code coming from MyType module throws a subtypes not defined error. Any thoughts?
function s1type(T::DataType)
    println("type:\t\t", T)
    println("supertype:\t", supertype(T))
    println("subtypes:\t", subtypes(T))
    return nothing
end
s1type(Real)
module MyType
    export s2type
    function s2type(T::DataType)
        println("type:\t\t", T)
        println("supertype:\t", supertype(T))
        println("subtypes:\t", subtypes(T))
        return nothing
    end
end
using .MyType
s2type(Real) # ERROR: UndefVarError: subtypes not defined