The blonde bombshell and the singer, who broke up in 2007 after dating for nearly four years, both star in upcoming comedy Bad Teacher.
But when Diaz was asked by US television show Extra if it was awkward working together, she said: “No. Justin is incredibly talented, I felt really lucky.”
She added: 'Justin and me have always had a good laugh together, and to make a movie where we get to have a laugh together... There really was no one else who was more perfect for this part. That's why he got the part.'