On Wed, 2005-03-30 at 18:35 -0500, Aaron Sherman wrote:
> When the Perl 6 compiler sees:
>
> my X $a;
> $a.m(1);
>
> What should it do?
>
> Options:
>
> * Accept the method call regardless of the definition of X
> * Accept the method call if it matches the signature from X
> * Accept the method call if {magic($*INTERP)}
That's a fair question, but I think you're leaving out several important
pieces of information:
* Where does $a come from? (As far as I see, it's just an
uninteresting undef here, but I don't know if that's the point of the
code.)
* At what point in the program are you asking what the compiler sees?
* Where's the definition of X in relation to this code?
* What pragmas are in effect here?
* What other code may have altered the type definition of X or undef?
I don't think anyone can answer your question well without assuming some
answers to my questions.
-- c