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
Subset type used in Signatures fails with errors #1799
Labels
tests needed
Issue is generally resolved but tests were not written yet
Comments
This is the backtrace I get with
|
I suspect that this: 43b9c82#diff-deae5f68054ef8116f04d6cb78bc4395R8906 needs another condition that checks if $_ is definite. |
moritz
added
the
tests needed
Issue is generally resolved but tests were not written yet
label
May 5, 2018
cono
added a commit
to Raku/roast
that referenced
this issue
May 5, 2018
Subset type on Code with arity check failed in use in sub/method signatures or class attributes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
20:11 < moritz> it's a bug in the optimizer
The Problem
20:08 < cono> m: module A { my subset CAT is export of Code where { .arity == 2 } }; import A; sub xz(CAT :$c) { say $c(3, 5) }; xz(c => * <=> *)
20:08 <+camelia> rakudo-moar 1447f41: OUTPUT: «===SORRY!===Cannot look up attributes in a A::CAT type object»
Expected Behavior
subset type should work in signatures and class attributes.
Actual Behavior
fails with error: Cannot look up attributes in a CAT type object
Steps to Reproduce
20:12 < moritz> m: subset CAT of Code; sub xz(CAT $c) { };
20:12 <+camelia> rakudo-moar 1447f41: OUTPUT: «===SORRY!===Cannot look up attributes in a CAT type object»
Environment
perl6 -v
):perl6 -v
This is Rakudo version 2018.04.1-37-g1447f41e6 built on MoarVM version 2018.04-39-gc702f4c66
implementing Perl 6.c.
The text was updated successfully, but these errors were encountered: