Error when Local variables have a parametric type
node reverse<<type t; const size: int>>(array: t ^ size) returns (res: t ^ size);
var tem: t ^ 1;
let
tem[0] = array[size - 1];
res = with (size = 1) then array else tem | reverse<<int, size - 1>>(array[0 .. size - 2]);
tel;
node reverse_int = reverse<<int, 5>>;
when I run the code above with command "lv6 predefine.lus -n reverse_int -exec", it raises an error "Error: unknown type (t)". I think it is because Local variables cannot have a parametric type.Do I understand it correcly?
Edited by EXT wang yong