opendylan
opendylan copied to clipboard
Warn about unused results when no side-effects
Module: my-app
define function main
(name :: <string>, arguments :: <vector>)
local method usage()
format-out("foo\n");
end;
arguments.size = 1 | usage;
format-out("Hello, world!\n");
end;
main(application-name(), application-arguments());
Above I should've written usage() rather than usage. The compiler should warn in this situation because there's no point in returning usage as a value in that context.