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
Type objects are writable in Rakudo #1030
Comments
From @masak<masak> rakudo: class Dog {}; say Dog.defined; Dog .= new; say Dog.defined |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-construction/new.t commit c580fe86e3cb3b391a413b1cffdbe3bcf266c92d [t/spec] Test for RT #66204: NewClass .= new should die Inline Patchdiff --git a/t/spec/S12-construction/new.t b/t/spec/S12-construction/new.t
index d4c93a3..0be3f8e 100644
--- a/t/spec/S12-construction/new.t
+++ b/t/spec/S12-construction/new.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 12;
+plan *;
class Parent {
has $.x;
@@ -36,4 +36,15 @@ lives_ok { $o = GrandChild.new( Parent{ :x<5> }, Child{ :y(4) }) },
is $o.y, 4, '... worked for the class Child (other order)';
is $o.x, 5, '... worked for the class Parent (other order)';
+# RT #66204
+{
+ class RT66204 {}
+ ok ! RT66204.defined, 'NewClass is not .defined';
+ #?rakudo 2 todo 'RT 66204'
+ dies_ok { RT66204 .= new }, 'class asked to build itself refuses';
+ ok ! RT66204.defined, 'NewClass is still not .defined';
+}
+
+done_testing;
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzproblem fixed, tests pass now... |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66204 (status was 'resolved')
Searchable as RT66204$
The text was updated successfully, but these errors were encountered: