Can the back side of a window type aircon exhaust in an empty ceiling area?
I think you'd find that the heat built up and leaked right back into the living area, unless the attic area was actively ventilated. That's where a lot of the heat in your unit is coming from in the first place, after all. And pumping heat with an A/C is less efficient if you're pumping it into an even hotter space.