Ddi you buy it from a dealer or private party? I'm not sure in either case. I want to say dealers need to tell you, and if you ran a Carfax and the bodyshop listed it, it shoulda been mentioned.
Private Party they don't HAVE to tell, like if you didnt' ask... it'd be kinda sleazy of them not to, but well within their right if it's been fixed and the potential buyer didn't ask.
I'm not sure that's right though, or if liability varies by state...