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

LTA error message when a where block fails in a subtype during single dispatch in Rakudo #1689

Closed
p6rt opened this issue Apr 13, 2010 · 4 comments
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented Apr 13, 2010

Migrated from rt.perl.org#74348 (status was 'resolved')

Searchable as RT74348$

@p6rt
Copy link
Author

@p6rt p6rt commented Apr 13, 2010

From @masak

<masak> rakudo​: subset Foo of Array where { .elems == 5 }; sub bar(Foo
$_) {}; bar([1,2,3])
<p6eval> rakudo cb4521​: OUTPUT«Nominal type check failed for parameter
'$_'; expected Array but got Array instead [...]
* masak submits rakudobug
<masak> it's not the nominal typecheck that fails, it's... the other one.
<masak> the one with the where clause, whatever it's called.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Jul 20, 2010

From @jnthn

On Tue Apr 13 08​:51​:39 2010, masak wrote​:

<masak> rakudo​: subset Foo of Array where { .elems == 5 }; sub bar(Foo
$_) {}; bar([1,2,3])
<p6eval> rakudo cb4521​: OUTPUT«Nominal type check failed for parameter
'$_'; expected Array but got Array instead [...]
* masak submits rakudobug
<masak> it's not the nominal typecheck that fails, it's... the other one.
<masak> the one with the where clause, whatever it's called.

Fixed now​:

C​:\Consulting\rakudo>type test.p6
subset Foo of Array where { .elems == 5 };
sub bar(Foo $x) {};
bar([1,2,3]);

C​:\Consulting\rakudo>perl6 test.p6
Constraint type check failed for parameter '$x'
  in 'bar' at line 2​:test.p6
  in main program body at line 3​:test.p6

Given to moritz++ for spectesting.

Thanks,

Jonathan

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Jul 20, 2010

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

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Jul 24, 2010

@moritz - Status changed from 'open' to 'resolved'

Loading

@p6rt p6rt closed this Jul 24, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant