Skip to content

Commit

Permalink
Warning now gives the exact Code descendant class
Browse files Browse the repository at this point in the history
  • Loading branch information
cognominal committed Jun 21, 2015
1 parent 8276cee commit 62cdc29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Code.pm
Expand Up @@ -14,7 +14,9 @@ my class Code does Callable { # declared in BOOTSTRAP

method signature(Code:D:) { $!signature }

multi method Str(Code:D:) { warn("Code object coerced to string (please use .gist or .perl to do that)"); self.name }
multi method Str(Code:D:) {
warn( self.WHAT.perl ~ " object coerced to string (please use .gist or .perl to do that)"); self.name
}

method outer(Code:D:) {
nqp::ifnull(nqp::getcodeobj(nqp::p6staticouter($!do)), Mu)
Expand Down

0 comments on commit 62cdc29

Please sign in to comment.