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

Add test for #1486 #746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion S09-hashes/objecthash.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 55;
plan 56;

{
class A { method Str() { 'foo' } };
Expand Down Expand Up @@ -140,6 +140,11 @@ plan 55;
eval-lives-ok 'my %*a{Int}', "Accept dynamic object hash"
}

# https://github.com/rakudo/rakudo/issues/1486
{
ok {:foo, (if 0.5.rand < 1 { :bar })}, 'a conditional inside circumfix {} works';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to ask about a comment explaining the approach about if. It's going to be really confusing what purpose of it without the background of this PR.

BTW, a sufficiently sophisticated static optimizer would optimize away this if too. But, unfortunately, we're not going get one of the kind any time soon.

}

#vim: ft=perl6

# vim: expandtab shiftwidth=4