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
non-awesome error message on 'class NewClass does OldClass' #1123
Comments
From @moritz08:53 <@moritz_> rakudo: class A { }; class B does A { }; say "alive" I think abusing a class as a role is forbidden, but the error message Cheers, |
From @chromaticOn Monday 06 July 2009 23:55:28 Moritz Lenz wrote:
I hope it's not! -- c |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzchromatic wrote:
Well, it surely depends on context. You can "pun" a role into a class by I haven't found a concrete reference in the specs if it's actually Cheers, |
From @jnthnMoritz Lenz wrote:
As it stands right now... class C does R { } # composes the role
I've heard the whole "every class implies a role" and "you can take a Thanks, Jonathan |
From @jnthnOn Mon Jul 06 23:55:28 2009, moritz wrote:
While at some point we may end up spec'ing that you actually get your
Giving to moritz++ for spectests (I guess one to check that we get an Thanks, Jonathan |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S14-roles/basic.t commit 4b8222394636ac4bb66f3661dfa9cee5dc0f30b2 [t/spec] tests for RT #67278, non-awesome error message for class Foo does NonRole Inline Patchdiff --git a/t/spec/S14-roles/basic.t b/t/spec/S14-roles/basic.t
index 405e2ba..9d48c95 100644
--- a/t/spec/S14-roles/basic.t
+++ b/t/spec/S14-roles/basic.t
@@ -114,6 +114,15 @@ eval_dies_ok '0 but RT66178', '"but" with non-existent role dies';
'... and the error message mentions the role';
}
+# RT #67278
+{
+ class AClass { };
+ my $x = eval 'class BClass does AClass { }; 1';
+ nok $x, 'class SomeClass does AnotherClass dies';
+ ok "$!" ~~ /AClass/, 'Error message mentions the offending non-role';
+
+}
+
done_testing;
# vim: ft=perl6 |
From @moritz... and now tested appropriately. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#67278 (status was 'resolved')
Searchable as RT67278$
The text was updated successfully, but these errors were encountered: