Skip to content

Commit 3475a05

Browse files
committed
Test for RT81718
1 parent e50ee94 commit 3475a05

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

S12-class/attributes.t

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 20;
5+
plan 22;
66

77
# L<S12/Methods/"For a call on your own private method">
88

@@ -106,4 +106,19 @@ is($bar.bar[2], 300, 'array attribute initialized/works');
106106
'Providing a list of attributes to a single "has" works';
107107
}
108108

109+
# RT 81718
110+
{
111+
class RT81718 {
112+
has $.bughunt is rw;
113+
sub bomb { "life is a $.bughunt" }
114+
method meta_bomb { "the good " ~ bomb() }
115+
}
116+
117+
my $rt81718 = RT81718.new();
118+
119+
dies_ok { $rt81718.bomb() }, 'no attribute access for sub';
120+
#?rakudo todo 'RT81718'
121+
dies_ok { $rt81718.meta_bomb() }, 'no attr access for sub from method';
122+
}
123+
109124
# vim: ft=perl6

0 commit comments

Comments
 (0)