I was using a Scizor in psychic terrain. My only attacking move was bullet punch, so normally I wouldn't be able to attack. However, it worked anyway, despite being a priority move.
Replay: http://replay.pokemonshowdown.com/gen7pokebankou-487061472
It happens on the last turn of the match. (Turn 22)