If I declare a type as
struct Test
x::T where T
end
is it identical to declaring it as
struct Test
x::Any
end
?
If I declare a type as
struct Test
x::T where T
end
is it identical to declaring it as
struct Test
x::Any
end
?
Indeed. In fact, we have Any === (T where T)
:
julia> T where T
Any
A more direct way to check is using fieldtype
/fieldtypes
:
julia> struct Test
x::T where T
end
julia> fieldtypes(Test)
(Any,)