passing non-block to #do: freezes slate

Brian Rice water at tunes.org
Mon May 15 19:06:12 PDT 2006


On May 15, 2006, at 6:42 PM, Brian Rice wrote:
> On May 15, 2006, at 4:49 PM, Brian T. Rice wrote:
>> On Mon, May 15, 2006 11:29 am, Timmy Douglas said:
>>> running:
>>>
>>> #(1 2 3) do: {| :blah | blah }.
>>>
>>> doesn't seem to return. It should probably throw an error instead.
>>
>> Agreed. What I think is happening (without Slate at-hand) is an  
>> attempt to
>> call #do/#applyTo: on the array and then a MethodNotFound error  
>> should be
>> raised. Why this would induce an infinite loop, I cannot say just  
>> yet.
>
> Okay, now that I've tested it, I see that it's a parser error, NOT  
> a VM error:
>
> Slate 1> #(1 2 3) do: {1. 2. 3}.
> The method #applyTo: was not found for the following arguments:
> {{...}. {...}}
>
> So basically the problem is that a block header in an unexpected  
> lexical context (specifically, a literal array, since I can't  
> reproduce it in a couple of other situations) is not handled right  
> and should be fixed. I'll see if I can fix this, but no guarantees.

I've pushed a fix for this which I have not bootstrapped in yet, but  
does not break the block-parsing functionality and does raise an  
error properly in the right context.

However, raising that error results in a recursion in the debugger,  
since the Parser has a further error that it does not reset properly  
RE: console access. This is a more fundamental issue that needs to be  
dealt with separately. I'll give it some thought as well.

--
-Brian
http://tunes.org/~water/brice.vcf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20060515/d22ce381/PGP.pgp


More information about the Slate mailing list