in reply to A small question about perl6
Maybe there is already detection of unused variables programmed into rakudo. And that detection does an additional check on the IO object.