Skip to content
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

t/spec/S03-smartmatch/array-hash.t failes with "Type check failed" #3801

Open
p6rt opened this issue May 2, 2015 · 3 comments
Open

t/spec/S03-smartmatch/array-hash.t failes with "Type check failed" #3801

p6rt opened this issue May 2, 2015 · 3 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented May 2, 2015

Migrated from rt.perl.org#124444 (status was 'open')

Searchable as RT124444$

@p6rt
Copy link
Author

@p6rt p6rt commented May 2, 2015

From lembark@wrkhors.com

$ 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

#NYPerlHackathon

--
Steven Lembark 3646 Flora Pl
Workhorse Computing St Louis, MO 63110
lembark@​wrkhors.com +1 888 359 3508

@p6rt
Copy link
Author

@p6rt p6rt commented Oct 24, 2015

From @usev6

On Sat May 02 12​:04​:46 2015, lembark@​wrkhors.com 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

@p6rt
Copy link
Author

@p6rt p6rt commented Oct 24, 2015

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.