Skip to content

Commit

Permalink
Streamline Parameter.named a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 1, 2016
1 parent 6f96209 commit cf3b121
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/core/Parameter.pm
Expand Up @@ -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)
Expand Down

0 comments on commit cf3b121

Please sign in to comment.