develooper Front page | perl.perl6.users | Postings from December 2018

say Cool-concat-junction question

Thread Next
From:
yary
Date:
December 23, 2018 03:05
Subject:
say Cool-concat-junction question
Message ID:
CAG2CFAYoVBjimAAj3rFPNmK6Vz0XTe3mXpGi6q5ch1gHbOL4dA@mail.gmail.com
What's going on here- is this error a mistake on my part, or a bug?

$ perl6 -e "say 3 ~ ( 'a' | 'b' )"

Type check failed for return value; expected Str:D but got Junction
(any("3a", "3b"))

  in block <unit> at -e line 1

$ perl6 -e "say 'x' ~ ( 'a' | 'b' )"

any(xa, xb)

$ perl6 -v

This is Rakudo Star version 2018.10 built on MoarVM version 2018.10

implementing Perl 6.c.


-y

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About