Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for RT #125625.
  • Loading branch information
jnthn committed Jul 18, 2015
1 parent a8a86ef commit f0dcafa
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S12-attributes/class.t
@@ -1,6 +1,8 @@
use v6;

use Test;
use lib 't/spec/packages';
use Test::Util;

=begin pod
Expand All @@ -11,7 +13,7 @@ Class Attributes
#L<S12/Class attributes/"Class attributes are declared">
#L<S12/Class methods/Such a metaclass method is always delegated>

plan 21;
plan 23;

class Foo {
our $.bar = 23;
Expand Down Expand Up @@ -128,4 +130,16 @@ dies-ok {$test5 = Quux.bar}, 'class attribute accessor hidden by accessor in sub
'cannot declare attribute inside of an EVAL in class';
}

# RT #125625
is_run(
'our $.a',
{ err => -> $o { $o ~~ /:i useless/ && $o ~~ /:i accessor/ } },
'useless our $.a accessor method generation error contains useful enough hints'
);
is_run(
'our $.a',
{ err => -> $o { $o ~~ /:i useless/ && $o ~~ /:i accessor/ } },
'useless my $.a accessor method generation error contains useful enough hints'
);

# vim: ft=perl6

0 comments on commit f0dcafa

Please sign in to comment.