New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot return an Array with Strs from a sub that declares a return type of Array of Str in Rakudo #1096
Comments
From @masak<masak> rakudo: sub foo(--> Array of Str) { my Str @a = <foo bar baz>; @a }; foo I might have misunderstood something -- but if this isn't the way to |
@coke - Status changed from 'new' to 'open' |
From @bbkrNOM returns array of strings as expected bbkr:nom bbkr$ ./perl6 -e 'sub foo(--> Array of Str) { my Str @a = <foo |
From @bbkrBut does not check subtypes as expected, this should not pass: bbkr:nom bbkr$ ./perl6 -e 'sub foo(--> Array of Str) { my Str @a = |
From @cokeOn Sat Sep 10 17:09:52 2011, bbkr wrote:
We've lost ground here: $ cat strings.pl $ cat mixed.pl strings.pl shouldn't be failing on the return, and mixed.pl should be failing on the assignment. -- |
From timk@jtimothyking.comI've observed this with Array[Int] as well, and I'm assuming it's the same with arrays of Now, I've observed it with a non-array type. (I don't know whether it's the same or a $ install/bin/perl6 --version
(Same symptom in Rakudo 2013.08 and in Rakudo-JVM.) |
From @jnthnOn Tue Jun 23 03:15:22 2009, masak wrote:
It's the correct way, and it's fixed now; test covering this added to roast in b421638. Thanks! /jnthn |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66892 (status was 'resolved')
Searchable as RT66892$
The text was updated successfully, but these errors were encountered: