Skip to content

Commit

Permalink
[t/spec] tests for RT #69967, constant declarations and classes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@28884 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Oct 22, 2009
1 parent 438bcce commit b2ae3d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions S04-declarations/constant.t
Expand Up @@ -246,6 +246,21 @@ plan *;
'assign constant its own value from expression';
}

#?rakudo skip 'RT 69967'
{
constant C = 6;
class A {
constant B = 5;
has $.x = B;
has $.y = A::B;
has $.z = C;
}

is A.new.x, 5, 'Can declare and use a constant in a class';
is A.new.y, 5, 'Can declare and use a constant with FQN in a class';
is A.new.z, 6, 'Can use outer constants in a class';
}

done_testing;

# vim: ft=perl6

0 comments on commit b2ae3d9

Please sign in to comment.