No, definitely not. The compiler couldn't care less if your arguments are correct. Consider:
func cleanupTemporaryDir() {
os.RemoveAll("/")
}
You might have some very unhappy users if you ship that. Of course, as you would have documented your intended behaviour, the mistake is going to get caught when you run your tests, making it abundantly clear that you screwed up before bad things happen. Like before, you're not going to end up out.
Sure, a language with a deeper type system can place restrictions on what kinds of values you can pass in. "/" would be prevented by the type checker, letting it be known as you type and not later when you run the tests. That is nice. Nobody is going to deny that. But this act as if it is the only thing that will save you is completely disconnected from reality. Our world does not exist in this imagined vacuum where when one thing doesn't exist nothing does.