SD0118
Core code
grad cannot differentiate this function
No "use typeshade" program on this site raises this code, so the page has no example. The fn() builder builds the IR directly and reaches the check at the lines under Source.
The registry text and every compiler message on these pages are the compiler's own English.
When it fires
grad (roadmap 0.7 item 18) differentiates a function's IR in forward mode. A construct it has no derivative rule for is refused by name rather than given a zero derivative, since a silent zero is a wrong answer that looks like a right one.
How to fix it
The registry's hint: the detail names the construct and what to write instead; grad differentiates f32, float-vector and float-matrix arithmetic, the component-wise builtins, if, switch and for, and calls to other functions of the module
See also
Source
Where the compiler raises this code at commit 26de7be8, one line per file: