id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
1108	"Subs in ""built-in PMC"" namespaces are treated as PMC methods"	Austin_Hastings		"A sub that is declared in a namespace that matches the name of a builtin PMC is automatically dispatched as a method:
{{{
$ cat x.pir
.sub main
    $P0 = new 'Integer'
    $P0.'foo'()
.end

.namespace ['Integer']

.sub 'foo'
    say 'foo'
.end

$ ./parrot x.pir
foo
$ 
}}}

While this *does* make it possible to override builtin methods,
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.

This behavior does not happen with non-builtin classes:
{{{
$ cat y.pir
.sub main
    $P1 = newclass ['XYZ']
    $P0 = new ['XYZ']
    $P0.'foo'()
.end

.namespace ['XYZ']

.sub 'foo'
    say 'foo'
.end

$ ./parrot y.pir
Method 'foo' not found for invocant of class 'XYZ'
current instr.: 'main' pc 11 (y.pir:4)
$ 
}}}"	bug	new	normal		none	1.6.0	medium						
