Skip to content

Commit

Permalink
Binding Failure to Array throws useful error
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 12, 2017
1 parent 0fb5a01 commit 5cd8dff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion S03-binding/arrays.t
Expand Up @@ -4,7 +4,7 @@ use Test;

# L<S03/Item assignment precedence>

plan 47;
plan 48;

# Binding of array elements.
# See thread "Binding of array elements" on p6l started by Ingo Blechschmidt:
Expand Down Expand Up @@ -228,4 +228,9 @@ plan 47;
'can only bind Positional stuff to @a';
}

# RT #118397
throws-like { sub foo { fail }; my @a := foo },
X::TypeCheck::Binding, :got(Failure),
'binding Failure to Array throws useful error';

# vim: ft=perl6

0 comments on commit 5cd8dff

Please sign in to comment.