Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adverbs now attach to identifiers
  • Loading branch information
TimToady committed Nov 5, 2015
1 parent 7390453 commit aa4ba57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions S03-operators/ternary.t
Expand Up @@ -77,7 +77,7 @@ throws-like { EVAL '1 ?? 3 :: 2' },
second-part => "::",
'conditional operator written as ?? :: throws typed exception';

throws-like { EVAL '1 ?? 3:foo :: 2' },
throws-like { EVAL '1 ?? 3 :foo :: 2' },
X::Syntax::ConditionalOperator::PrecedenceTooLoose,
operator => ":foo",
'adverbed literal in second part of ternary';
Expand All @@ -94,14 +94,14 @@ throws-like { EVAL '1 ?? 3:foo :: 2' },
'adverb in second part of ternary used with parenthesis works';
}

throws-like { EVAL '1 ?? (3:foo) !! 2' },
throws-like { EVAL '1 ?? (3 :foo) !! 2' },
X::Syntax::Adverb,
'parenthesized adverbed literal in second part of ternary';

{
my $three = 3;
my $thing = 1 ?? $three:foo !! 2;
is $three, 3, 'variable and adverb in second part of ternary';
my $three:foo = 3;
my $thing:foo = 1 ?? $three:foo !! 2;
is $three:foo, 3, 'variable and adverb in second part of ternary';
}

throws-like { EVAL '1 ?? 3 : 2' },
Expand Down

0 comments on commit aa4ba57

Please sign in to comment.