It's impossible to fairly analyze a situation like this without being there.
However, given the gentle sweeping curve there, it's possible that you would have been OK if your friend hadn't reached at all.
The car was moving faster than you, as evidenced by the fact that passed, and shouldn't have need to slow for the turn, so even if it only cleared by inches, the gap would have been opening, not closing.
Otherwise, knowing I had a pace line behind me, I would have made the turn with the car, rather than braking hard.
For the record, I have sent bias against pace line riding on open roads. It's fine on closed courses, and even OK on long stretches free of intersections, but there are too many surprises otherwise. So maybe the right answer is to increase separation approaching intersections, and tighten back afterward.
BTW sometimes there is no solution that would avoid a crash, other than not being there at the time.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.