What happens if you polymorph something like an elephant into a frog, and then place a forcecage around said frog with the polymorph spell ending before the forcecage does?
Does the elephant just appear outside the forcecage or does the elephant turn into a compact cube of meat?
Forcecage, page 243 PHB
A prison in the shape of a box can be up to 10 feet on a side, creating a solid barrier that prevents any matter from passing throllgh it and blocking any spells cast into or out from the area.
When you cast the spell, any creature that is completely inside the cage's area is trapped. Creatures only partially within the area, or those too large to fit Inside the area, are pushed away from the center of the area until they are completely outside the area.
A creature inside the cage can't leave It by nonmagical means.
In this scenario, this is a Tiny sized force box around the frog, so this will end up resulting in a Huge sized elephant in a Tiny area (up to 10 feet on a side) that no matter can escape from.
The RAW vagueness comes from the second and third paragraph. Is the second sentence of the second paragraph an extension of the 1st sentence, as in it only applies upon the initial casting? Also, would the Polymorph spell ending be a "magical means" to leave the forcecage, applying to "those too large to fit Inside the area, are pushed away from the center of the area until they are completely outside the area."?