From b2ae3d96588c1fd74d667a240b5c6db15c340eb9 Mon Sep 17 00:00:00 2001 From: moritz Date: Thu, 22 Oct 2009 19:48:21 +0000 Subject: [PATCH] [t/spec] tests for RT #69967, constant declarations and classes git-svn-id: http://svn.pugscode.org/pugs@28884 c213334d-75ef-0310-aa23-eaa082d1ae64 --- S04-declarations/constant.t | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/S04-declarations/constant.t b/S04-declarations/constant.t index b207465c76..e7aa000153 100644 --- a/S04-declarations/constant.t +++ b/S04-declarations/constant.t @@ -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