New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$.bar getter method calls are always undefined inside a Str method in a class derived from Str in Rakudo #1319
Comments
From @masak<masak> rakudo: class A { has |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S13-type-casting/methods.t commit ed12a3d34d0f2b594d023d49b967273ea6d3e0e0 [t/spec] Test for RT #69378 Inline Patchdiff --git a/t/spec/S13-type-casting/methods.t b/t/spec/S13-type-casting/methods.t
index e15a7f1..8144e48 100644
--- a/t/spec/S13-type-casting/methods.t
+++ b/t/spec/S13-type-casting/methods.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 2;
+plan 4;
# L<S13/Type Casting/"whose name is a declared type, it is taken as a coercion
# to that type">
@@ -14,4 +14,20 @@ my $o = CoercionTest.new();
is ~$o, 'foo', 'method Str takes care of correct stringification';
ok +$o == 1.2, 'method Num takes care of correct numification';
+# RT #69378
+{
+ class RT69378 {
+ has $.x = 'working';
+ method Str() { $.x }
+ }
+ is RT69378.new.Str, 'working', 'call to .Str works';
+
+ class RT69378str is Str {
+ has $.a = 'RT #69378';
+ method Str() { $.a }
+ }
+ #?rakudo todo 'RT 69378'
+ is RT69378str.new.Str, 'RT #69378', 'call to .Str works on "class is Str"';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzTests now pass; closing ticket. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#69378 (status was 'resolved')
Searchable as RT69378$
The text was updated successfully, but these errors were encountered: