That only means you didn't do enough testing, nor thorough testing.
TDD (or test-driven development) arose for this very reason.
Type safety doesn't guarantee bug-free code. Moreover, type-related bugs are a tiny percentage of all the software defects that exist in any project.