Skip to content

Commit

Permalink
Tweak to .constraints to pass another spectest.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 10, 2009
1 parent 4cdac8a commit 925fd06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/classes/Signature.pir
Expand Up @@ -68,7 +68,7 @@ Returns a C<List> of C<Parameter> descriptors.

# Make sure constraints is non-null.
unless null cons_type goto cons_done
cons_type = 'undef'()
cons_type = get_hll_global ['Bool'], 'True'
cons_done:

# Any names?
Expand Down
5 changes: 3 additions & 2 deletions src/setting/Signature.pm
Expand Up @@ -57,8 +57,9 @@ class Signature is also {
elsif !$param.optional && $param.named && !$param.slurpy { take '!' }

# Any constraints?
if $param.constraints {
take ' where ' ~ $param.constraints.perl;
my $cons_perl = $param.constraints.perl;
if $cons_perl ne 'Bool::True' {
take ' where ' ~ $cons_perl;
}

# Default.
Expand Down

0 comments on commit 925fd06

Please sign in to comment.