You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Test;
# This works fine
print *begin(b"hi") == 'h';
# This has a `spicyc` compiler error:
# [error] [..] cannot coerce expression 'begin(b"hi")' of type 'iterator<bytes>' to type 'uint<8>'
print *begin(b"hi") in set<uint8>('h', 'i');
# This works again
print (*begin(b"hi")) in set<uint8>('h', 'i');
I get an error on that second print - but I don't see a good case for * to not go first.
It might also get the right precedence but not get validated right, but I haven't looked very deeply yet.
Is this expected? It feels like a bug to me. Should also check other similar cases
The text was updated successfully, but these errors were encountered:
Given this program:
I get an error on that second
print
- but I don't see a good case for*
to not go first.It might also get the right precedence but not get validated right, but I haven't looked very deeply yet.
Is this expected? It feels like a bug to me. Should also check other similar cases
The text was updated successfully, but these errors were encountered: