Why it didn't show error during compilation?