Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

:anon flag bug?

瀏覽次數:0 次
跳到第一則未讀訊息

Klaas-Jan Stol

未讀,
2007年2月18日 上午11:46:402007/2/18
收件者:Perl 6 Internals
hi,

I was working on a test for addmethod op (ticket #39196: [TODO] tests -
need to test addmethod) and
tried this:

.sub main :main

# this works:
hello()

# while this does not:
$P0 = find_name "hello"
$P0()
.end


.sub hello :anon
print "Hello world!\n"
.end

My question is, should the call "hello()" not fail as well? hello is an
anonymous sub, so it should not be found when calling hello().

Is this a bug?

regards,
kjs

0 則新訊息