Thanks for the answer! One detail I haven't really understood from what I've read about this is why the compiler couldn't produce a warning when it makes these assumptions about a method.
Would it just always produce such a huge number of warnings that it would be unusable in practice?