From cf3b121b799a4963b2ae12c61e75b30b327e9ecb Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Tue, 1 Mar 2016 13:11:05 +0100 Subject: [PATCH] Streamline Parameter.named a bit --- src/core/Parameter.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/core/Parameter.pm b/src/core/Parameter.pm index 3be584af7d7..1bb6e9be765 100644 --- a/src/core/Parameter.pm +++ b/src/core/Parameter.pm @@ -85,17 +85,14 @@ my class Parameter { # declared in BOOTSTRAP nqp::hllize($!post_constraints)) } - method type() { - $!nominal_type - } - + method type() { $!nominal_type } + method named_names() { self!arrayize('$!named_names') } method named() { - !nqp::p6bool(nqp::isnull($!named_names)) || - nqp::p6bool($!flags +& $SIG_ELEM_SLURPY_NAMED) + nqp::p6bool( + $!named_names || nqp::bitand_i($!flags,$SIG_ELEM_SLURPY_NAMED) + ) } - method named_names() { self!arrayize('$!named_names') } - method positional() { nqp::p6bool( nqp::isnull($!named_names)