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
Declaring a method named BUILD should produce a warning #1025
Comments
From @pmichaudSee S12:611: "If you attempt to get around this by declaring C<BUILD> as Pm |
From @jnthnOn Thu May 28 11:52:22 2009, pmichaud wrote:
I implemented the warning in git 1317e53. Assigning to moritz++ for Jonathan |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOops, forgot to cc this to the list... On Tue Jun 30 05:30:14 2009, jnthn@jnthn.net wrote:
dire
|
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-construction/BUILD.t commit 019a2b38ac7a6ba8bb99d06e6b0843d3aa3eff0d [t/spec] test for RT #66120, a method BUILD should warn Inline Patchdiff --git a/t/spec/S12-construction/BUILD.t b/t/spec/S12-construction/BUILD.t
index 783f223..4f53852 100644
--- a/t/spec/S12-construction/BUILD.t
+++ b/t/spec/S12-construction/BUILD.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 7;
+plan 8;
# L<S12/Construction and Initialization/The default BUILD and BUILDALL>
@@ -97,4 +97,13 @@ TestCompiler.new;
is $counter, 1, "testing BUILD in compiler subclass";
}
+{
+ BEGIN { @*INC.push: 't/spec/packages' }
+ use Test::Util;
+ is_run
+ 'class Foo { method BUILD() { ... } }',
+ { out => '', err => /BUILD/ & /submethod/ },
+ 'method BUILD produces a compile-time warning';
+}
+
# vim: ft=perl6 |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66120 (status was 'resolved')
Searchable as RT66120$
The text was updated successfully, but these errors were encountered: