Closed MarkoSchuetz closed 3 years ago
The bug isn't in HELP source: ?? (meta-of :call*)/parameter-notes also has off-by-one error
First bad commit: c0408f94 (Restore RETURN type checking functionality)
Thanks for finding the commit...!
The issue affects any function that doesn't have a RETURN: in its spec. Most natives do, but that CALL* was an alias for a native that did not.
>> x: func [a {alpha} b {beta}] [return a]
== #[action! [a b]]
>> help x
USAGE:
X a b
DESCRIPTION:
(undocumented)
X is an ACTION!
RETURNS: (undocumented)
alpha
ARGUMENTS:
a
beta
b
What's a headache and holding this up is that I need to pin down a bit more about frame mechanics when it comes to the oddities of RETURN and multi-return.
I was in the middle of trying to do a generalized fix, so I didn't put my attention on a patch just for this issue. However that generalized fix wound up on hold and I didn't come back to this.
I'm actually back to looking at related issues so I'll raise the priority on it.
Sorry this took so long to get around to fixing. I should have just patched it instead of trying to finish the rewrite I was doing...
https://github.com/metaeducation/ren-c/commit/adb36325f92ead632f8b7d8f6eaa93f73efaece7
As part of the commit I added some primordial tests of the kind that I think are needed if people are going to be concerned with HELP staying in working order. But there's still a lot of nuts & bolts that have to be tended to in terms of type checking...what's in this auxiliary information and what its invariants are. So worrying about "help inheritance" is a whole new angle of problem, especially when it's typical that you want to override it. Might seem easy, but it's non-trivial stuff!
The descriptions of the refinements seem to be off by one, for example