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
No X::TypeCheck when pushing something with a wrong type to a native typed array #4223
Comments
From @usev6Two tests in S02-types/array-shapes.t fail, because pushing a string to a typed array of type 'int' dies with X::AdHoc instead of X::TypeCheck: $ perl6-m -e 'my int @a; push @a, "s"' $ perl6-m -e 'my Int @a; push @a, "s"' |
From @lizmat
This is because it physically doesn’t fit.
This is because we don’t let it in. Perhaps the wording of the former can be changed? Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzOn Wed May 06 13:56:21 2015, elizabeth wrote:
It should at least contain the name of the type that can't unbox. Cheers, |
From @moritzHi, On Wed May 06 13:15:51 2015, bartolin@gmx.de wrote:
Fixed with these two commits: commit 94ad45b039aa6136ffba3fc791ffc99c9fc2adad RT #125123: Improve error message when pushing/unshifting to an int-typed array commit f5fbcde8dfb755c1b6c67b5cfd694d26c5627b16 RT #125123: Improve error message when assigning a Str to a native int array (not just for .push, but also for .unshift and assignment). I've adapted the tests in S09-typed-arrays/native-int.t to expect an X::TypeCheck. Cheers, |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125123 (status was 'resolved')
Searchable as RT125123$
The text was updated successfully, but these errors were encountered: