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
.sink of class not getting called, but Mu.sink is #5973
Comments
From @lizmat$ 6 'class A { method sink() { say "goodbye" } }; A’ I would expected this to say “goodbye” rather than being silent and issuing a warning. The fact that a class has a specific .sink method indicates that the developer had a plan for functioning in a sink environment. So it should a. call that method and b. not issue a warning. Adding an nqp::say(“sunk”) to Mu.sink reveals that in the above case Mu.sink *does* appear to be called. |
From @jnthnOn Tue, 03 Jan 2017 04:54:52 -0800, elizabeth wrote:
I think we consciously decided that use of a type object in sink context would always warn (justification is that it's been known to catch the odd precedence thinko). Note that with an instance: $ perl6-m 'class A { method sink() { say "goodbye" } }; A.new' It does exactly what you expect. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
From @AlexDanielI find the behavior surprising. Are there any examples of precedence thinkos that are caught by this? Added [RFC][@LARRY] tags, with just a little more information I think we'll be able to close. Maybe. On 2017-01-03 09:00:06, jnthn@jnthn.net wrote:
|
Migrated from rt.perl.org#130493 (status was 'open')
Searchable as RT130493$
The text was updated successfully, but these errors were encountered: