In reply to mikefitzgerald:
The compiler has to generate code for your task even though you think it never gets called. It may not be that easy to determine that at compile time.
Yes, the abstract/concrete class pattern would solve this. That way you have a standard API to all your SytemVerilog interfaces.
But for the code you have shown, you could just put this task declaration inside the interface.