When a bat is flying near a glass pane, you can shoot an arrow at it and it will take damage/die. Also if a bat is nesting on the top block supporting a glass pane, it can also be shot at. This can also happen with other mobs. This happens in both creative and survival.
Related issues
Comments

Duplicate of MC-1297, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.