suppose a bag makes a $1000 loan to you at 5% interest when the expected an actual inflation rate ar

suppose a bag makes a $1000 loan to you at 5% interest when the expected an actual inflation rate are 0%. Before you pay back the $1000 principal and $50 interest, the inflation rate increases to 10%. Did anyone lose from the situation?