fuzion
fuzion copied to clipboard
Subsequent errors after `duplicate feature` in loop.
This example from #302
loop_example =>
for
i := 1, i + 1
while i <= 10
i := i + 1
say i
produces one correct error, but this error is followed by three subsequent errors that should be supressed:
> ./build//bin/fz loop.fz
/home/fridi/fuzion/clean/fuzion.1/loop.fz:6:5: error 1: Duplicate feature declaration
i := i + 1
Feature that was declared repeatedly: 'loop_example.loop.i'
originally declared at /home/fridi/fuzion/clean/fuzion.1/loop.fz:4:5:
i := 1, i + 1
To solve this, consider renaming one of these two features, e.g., as 'iʼ' (using a unicode modifier letter apostrophe 'ʼ' U+02BC) or adding an additional argument (e.g. '_ unit' for an ignored unit argument used only to disambiguate these two).
/home/fridi/fuzion/clean/fuzion.1/loop.fz:5:9: error 2: Could not find called feature
while i <= 10
Feature not found: 'i' (no arguments)
Target feature: 'loop_example.loop'
In call: 'i'
/home/fridi/fuzion/clean/fuzion.1/loop.fz:6:10: error 3: Could not find called feature
i := i + 1
Feature not found: 'i' (no arguments)
Target feature: 'loop_example.loop'
In call: 'i'
/home/fridi/fuzion/clean/fuzion.1/loop.fz:4:5: error 4: Could not find called feature
i := 1, i + 1
Feature not found: 'i' (no arguments)
Target feature: 'loop_example.loop'
In call: 'i'
4 errors.