SS6 Economic conditions and asset class return

Can anyone advise on below answer is true and how to deal if inflation is unexpected: How will rising expected inflation affect the yield of credit risk free bonds vs inflation-indexed bonds? Answer: If rising inflation, the yield of credit risk free bonds will rise (since yield composed of real yield + expected inflation) but fo inflation indexed bonds, yield will dropped as demand will increase as investors seek out their inflation protection. How would the answer be different is inflaton is unexpected? Thanks in advance.

Maybe I’m missing something, but it seems pretty straightforward. Expected inflation would have no effect on either since it is already priced in. If unexpected, risk free bonds would be hurt more than inflation indexed.