In reply to dave_59:
In reply to SparkyNZ:
It would help if you learn how to post a minimal reproducible example. Maybe the problem is somewhere else. This code below ran on 4 different tools:
Apologies for not providing a complete module file. If your example module works on 4 different tools then I guess it is a problem/feature specific to Quartus II.
As you can see below, we get the same problem: