From f35ddf907306e8905ee293df4826f67a9fe5e1c5 Mon Sep 17 00:00:00 2001 From: Dan Collins Date: Sun, 3 Jul 2016 19:09:04 -0400 Subject: [PATCH] t/uni/overload.t: test for RT #3270 --- t/uni/overload.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/uni/overload.t b/t/uni/overload.t index 21d81ec..c534ecf 100644 --- a/t/uni/overload.t +++ b/t/uni/overload.t @@ -9,7 +9,7 @@ BEGIN { set_up_inc( '../lib' ); } -plan(tests => 216); +plan(tests => 217); package UTF8Toggle; use strict; @@ -296,3 +296,13 @@ TODO: { print "ok\n"; EOP } + +TODO: { + local $::TODO = 'RT #3270: Overloaded operators can not be treated as lvalues'; + fresh_perl_is(<<'EOP', '', {stderr => 1}, 'RT #3270: Overloaded operator that returns an lvalue can be used as an lvalue'); + use overload '.' => \˙ + sub dot : lvalue {my ($obj, $method) = @_; $obj -> {$method};} + my $o = bless {} => "main"; + $o.foo = "bar"; +EOP +} -- 1.8.3.1