Happened to me last year when my AA flight to LHR was delayed. BA put me on a later connecting flight to MUC and coded it as a revenue ticket which awarded me miles.
I was also booked on AAs 777W LHR-LAX earlier in the year on a paid ticket in business. Used a SWU upgrade in F, but the flight ended up being canceled. BA put me on one of their flights in first class and I was awarded mileage for a full BA F class ticket
I guess we get lucky sometimes