#389: subs with :method should not be entered as symbols in the namespace
----------------------+-----------------------------------------------------
Reporter: pmichaud | Owner: allison
Type: bug | Status: new
Priority: major | Milestone: 1.3
Component: core | Version: trunk
Severity: medium | Keywords:
Lang: perl6 | Patch: new
Platform: |
----------------------+-----------------------------------------------------
Comment(by pmichaud):
Replying to [comment:6 bacek]:
> I've attached proposed fix for this ticket. It's kinda cheating.
The proposed patch to me looks Very Wrong. Not all methods will be
anonymous in the namespace -- so using the SUB_FLAG_PF_ANON flag to filter
out methods is probably not a good approach.
In particular, the following method declarations should still appear as
entries in the namespace:
{{{
.sub 'xyz' :method :nsentry
...
.end
.sub '' :method('abc') :nsentry('def')
...
.end
}}}
Also, the patch appears to cause the following to fail:
{{{
.sub 'main' :main
# get 'abc' sub and store in namespace as 'def'
.const 'Sub' $P0 = 'abc'
set_global 'def', $P0
$P1 = get_global 'def' # should be valid lookup
$P1()
.end
.sub 'abc' :anon
say 'Hello from abc masquerading as def'
.end
}}}
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/389#comment:7>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets