Skip to content

Commit 10a658d

Browse files
committed
Test for RT #125227.
1 parent 42df59c commit 10a658d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

integration/weird-errors.t

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use Test;
33
use lib 't/spec/packages';
44
use Test::Util;
55

6-
plan 16;
6+
plan 17;
77

88
# this used to segfault in rakudo
99
#?niecza skip 'todo'
@@ -130,3 +130,17 @@ is_run '{;}',
130130
err => '',
131131
},
132132
'empty code block does not crash (used to do that on JVM)';
133+
134+
# RT #125227
135+
{
136+
my $code = q:to'--END--';
137+
class C {
138+
has $!x is rw;
139+
}
140+
--END--
141+
is_run(
142+
$code,
143+
{ status => 0, err => -> $o { $o ~~ /useless/ && $o ~~ /':2'/ } },
144+
'useless use of is rw reported on meaningful line'
145+
);
146+
}

0 commit comments

Comments
 (0)