I'll make it quick as most has been said already: the compiler's behavior is the correct one here.
Thank you very much PascalDragon for to have this unambiguous and reliable answer.
I will file a bug report for the Code Tools and improve the "official documentation" accordingly, but I will need some days for it.