fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

Allow loop-defined features to be qualified?

Open maxteufel opened this issue 2 years ago • 5 comments

To solve this, you may qualify the feature using 'ryu_test.#loop2.this.num' or 'universe.this.num'.

It is in fact not possible to solve this at the moment, even if you could type out #loop2 the counter suffix to loop is not guaranteed to stay constant for multiple invocations of Fuzion. Would it be worth to have a special feature this_loop.num or similar?

maxteufel avatar May 15 '23 11:05 maxteufel

Please do not create out-of-contexts issues. What did you do to create this message? What code did you run?

fridis avatar May 15 '23 13:05 fridis

This happens in #1440 if you do not change the for-loop in tests/ryu/ryu_test.fz.

maxteufel avatar May 16 '23 05:05 maxteufel

@maxteufel Can you provide some example code here that produces a similar error message?

michaellilltokiwa avatar Feb 21 '24 11:02 michaellilltokiwa

$ cat ex_num_loop.fz
ex_num_loop =>
  for
    num in 0..10
  do
    say num

maxteufel avatar Feb 21 '24 11:02 maxteufel

I think this should select just loops num. Not sure why it does not. If user wants to call universe.num one would have to use full qualifier.

michaellilltokiwa avatar Mar 25 '24 19:03 michaellilltokiwa

duplicate of #2347

michaellilltokiwa avatar May 21 '24 08:05 michaellilltokiwa