Affects Version/s: Minecraft 14w31a, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 15w43a
Fix Version/s: 20w07a
1. Switch gamemode to survival
2. Wait for (or set time to) night.
3. Drink a fire resistance potion.
4. Jump in lava and stay there for a bit, so you end up on fire (but you won't take damage because of fire resistance).
5. While on fire, try to sleep in a bed.
The player will be ejected from the bed almost immediately. It seems that the game thinks the player is taking "damage", ejecting it from the bed, even though fire resistance blocks the damage.