[parrot/parrot] 8ae5ff: [test] sub dispatch with builtin namespace
GitHub
noreply at github.com
Wed Feb 17 15:00:10 UTC 2016
Branch: refs/heads/rurban/builtin+sub-gh304
Home: https://github.com/parrot/parrot
Commit: 8ae5ffe8143f869edc2b62375642bc9786ce72af
https://github.com/parrot/parrot/commit/8ae5ffe8143f869edc2b62375642bc9786ce72af
Author: Reini Urban <rurban at cpanel.net>
Date: 2016-02-17 (Wed, 17 Feb 2016)
Changed paths:
M t/pmc/namespace-subs.t
Log Message:
-----------
[test] sub dispatch with builtin namespace
Subs in "built-in PMC" namespaces are treated as PMC methods even
without the :method attribute.
P1=new Integer
P1.foo()
namespace Integer
sub foo
Should error with
Method 'foo' not found for invocant of class 'Integer'
as it happens with subs of new namespaces.
This allows overriding of builtin methods, but it also makes it
impossible to write "class methods" that translate behaviors, since the
presence or absence of the :method attribute on the sub is ignored.
See GH #304, prev. TT #1108
More information about the parrot-commits
mailing list