What I expected to happen was...:
i should not be able to place blocks while not holding it
What actually happened was...:
i placed dirt...
Steps to Reproduce:
1. give bunch of dirt with about 6 cmd blocks
2. just play around with the hotbar and drop all items until it doesnt give
3. place blocks
4. btw, im on optifine
Invalid, modded client.
You are actually holding dirt, but the client is missing an update, which was MC-29318 and got fixed (but apparently is reintroduced with optifine).