hasmethod
t::T
t[!, something]
键是something可以有很多类型,我不想检查所有的内容,我只想一种表达hasmethod(getindex, Tuple{T, typeof{!}, S})的方法,而不管S是什么。
something
hasmethod(getindex, Tuple{T, typeof{!}, S})
S
我该怎么做?
我想使用hasmethod函数来查找对象t :: T是否支持t [!something]语法。关键是某些东西可以有多种类型,我不想检查所有的东西,我只是想一种方法...