summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-18 12:54:12 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 18:09:27 -0700
commitef38ce040f8843ec54aca57219ab9fbadcea4cb8 (patch)
treefae44478dd44fbc3ae017e10b1e4420b1815ceab /lib/overload.t
parent0a2c84ab2027a9fdfab9e35378f8e7a35f5413b7 (diff)
downloadperl-ef38ce040f8843ec54aca57219ab9fbadcea4cb8.tar.gz
overload.t: Another to-do test for isa changes
Changing a non-overloaded class’s @ISA such that it starts inheriting overloading should apply to objects already in that class, without requiring an explicit ‘bless \$dummy’ to update things.
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/overload.t b/lib/overload.t
index 7ff1214d7e..92b889ccdb 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -48,7 +48,7 @@ package main;
$| = 1;
BEGIN { require './test.pl' }
-plan tests => 5045;
+plan tests => 5046;
use Scalar::Util qw(tainted);
@@ -2204,6 +2204,7 @@ fresh_perl_is
sub eleventative::cos { 'eleven' }
sub twelvetative::abs { 'twelve' }
sub thirteentative::abs { 'thirteen' }
+sub fourteentative::abs { 'fourteen' }
@eleventative::ISA = twelvetative::;
{
local our $TODO = '[perl #112708]';
@@ -2219,6 +2220,10 @@ sub thirteentative::abs { 'thirteen' }
is cos $o, 'ten', 'method changes affect overloading';
@eleventative::ISA = thirteentative::;
is abs $o, 'thirteen', 'isa changes affect overloading';
+ bless $o, 'fourteentative';
+ @fourteentative::ISA = 'eleventative';
+ $TODO = '[perl #112708]';
+ is abs $o, 'fourteen', 'isa changes can turn overloading on';
}
{ # undefining the overload stash -- KEEP THIS TEST LAST