On Sat May 02 12:04:46 2015, [email protected] wrote:
> $ git describe
> Vladivostok-139-g95411f5
>
> Test fails from the command line:
>
> $ prove -v -e t/fudgeandrun t/spec/S03-smartmatch/array-hash.t;
> Type check failed in binding &call; expected 'Callable' but got
> 'Method+{<anon>}'
> in block <unit> at t/spec/S03-smartmatch/array-hash.t:8
>
> Checking the the REPL, comparing array and hash literals works:
>
> $ perl6;
>
> > <a> ~~ { a => 'b', c => Mu }
> True
>
> This fails with a variable, however:
>
> > my %h = (a => 'b', c => Mu);
> a => b, c => (Mu)
> > %h.perl
> {:a("b"), :c(Mu)}<>
>
> > ['a'] ~~ %h
> use of uninitialized value of type Any in numeric context
> Type check failed in binding &call; expected 'Callable' but got
> 'Method+{<anon>}'
> in block <unit> at <unknown file>:1
Just a note: AFAIU this has nothing to do with the RHS (variable or hash
literal), but with the LHS (scalar or array/list):
$ perl6 -e 'say <a>.WHAT; say <a> ~~ {a => "b", c => Mu};'
(Str)
True
$ perl6 -e 'say ["a"].WHAT; say ["a"] ~~ {a => "b", c => Mu};'
(Array)
Type check failed in binding &call; expected Callable but got
Method+{<anon|64178112>}
in block <unit> at -e:1