In 11.2 I was spelunking with GeneralUtilities`PrintDefinitionsLocal
and noticed that everything seemed to have a SubValues
kernel function.
This struck me as odd so I tried:
With[{s = Evaluate@Unique[sym]},
s // System`Private`HasSubCodeQ
]
True
It seems System`Private`HasSubCodeQ
is broken (which is a big pain for meta-programming).
Anyone else have this issue?
GeneralUtilities`PrintDefinitionsLocal@a
returnsa[___][___] := <<kernel function>>;
for undefined symbola
what is obviously a bug. Please report it. $\endgroup$With[{s = Evaluate@Unique[sym]}, SubValues@s]
behaves correctly and so doesWith[{s = Evaluate@Unique[sym]}, Language`ExtendedFullDefinition@s]
which is used by top level functions. But yes, interesting question. $\endgroup$