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
'Callable &x' in a signature doesn't mean what Rakudo thinks it means #1231
Comments
From @masak<jnthn> rakudo: sub foo( &x) { say "ok" }; foo({ say "lol" }) |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/code.t commit 7b90df932029168b1169472c623a5f015c91e54b [t/spec] Test for RT #68578 Inline Patchdiff --git a/t/spec/S06-signature/code.t b/t/spec/S06-signature/code.t
index 2ff20ee..26f8660 100644
--- a/t/spec/S06-signature/code.t
+++ b/t/spec/S06-signature/code.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 4;
+plan 6;
# TODO: move this test to closure-parameters.t if it works in the future
@@ -28,4 +28,12 @@ sub not_returns_a_sub { 3 };
dies_ok {tester2(not_returns_a_sub)},
"can't pass thing that doesn't do Callable";
+is tester2({ 'block' }), 1, 'Can pass a block to a ¶meter';
+
+# RT #68578
+{
+ sub rt68578( Callable &x ) {}
+ dies_ok { rt68578({ 'block' }) }, "Can't pass block that doesn't do Callable";
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @kylehaThe new tests for this pass, so I'm marking this resolved. |
@kyleha - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68578 (status was 'resolved')
Searchable as RT68578$
The text was updated successfully, but these errors were encountered: