Hi all,<br>
<br>
this fails:<br>
<br>
    <font color="#000000">{</font><font color="#000000">Object</font><font color="#000000"> </font><font color="#000080">>></font><font color="#000000"> </font><font color="#000080">#halt</font><font color="#000000">}</font><font color="#000000"> </font><font color="#000080">flatten</font><font color="#000000">.</font><br>
<br>
<font color="#808080">    CompiledMethod(Object)>>error:<br>
        Receiver: (Object>>#halt "a CompiledMethod(343681)")<br>
        Arguments and temporary variables: <br>
            aString:     'subscript is out of bounds: 1'<br>
        Receiver's instance variables: <br>
    (Object>>#halt "a CompiledMethod(343681)")<br>
<br>
    CompiledMethod(Object)>>errorSubscriptBounds:<br>
        Receiver: (Object>>#halt "a CompiledMethod(343681)")<br>
        Arguments and temporary variables: <br>
            index:     1<br>
        Receiver's instance variables: <br>
    (Object>>#halt "a CompiledMethod(343681)")<br>
<br>
    CompiledMethod(Object)>>at:<br>
        Receiver: (Object>>#halt "a CompiledMethod(343681)")<br>
        Arguments and temporary variables: <br>
            index:     1<br>
        Receiver's instance variables: <br>
    (Object>>#halt "a CompiledMethod(343681)")<br>
<br>
    CompiledMethod(SequenceableCollection)>>do:<br>
        Receiver: (Object>>#halt "a CompiledMethod(343681)")<br>
        Arguments and temporary variables: <br>
            aBlock:     [closure] in [] in CompiledMethod(SequenceableCollection)>>flatten<br>
            index:     1<br>
            indexLimiT:     48<br>
        Receiver's instance variables: <br>
    (Object>>#halt "a CompiledMethod(343681)")<br>
<br>
    [] in CompiledMethod(SequenceableCollection)>>flatten<br>
        Receiver: (Object>>#halt "a CompiledMethod(343681)")<br>
        Arguments and temporary variables: <br>
            stream:     a WriteStream<br>
        Receiver's instance variables: <br>
    (Object>>#halt "a CompiledMethod(343681)")</font><br>
<br>
You get the problem, we don't want to split up compiled codes. How should we fix it? Replace <font color="#000080"><font face="Bitmap DejaVu Sans" size="9">each</font></font><font color="#000000"><font face="Bitmap DejaVu Sans" size="9"> </font></font><font color="#000080"><font face="Bitmap DejaVu Sans" size="9">isString</font></font> with something like <font color="#000080">each</font><font color="#000000"> </font><font color="#FF0000">canBeFlattened</font>? Or just override <font color="#000080">#flatten</font> on String and CompiledCode instead?<br>
<br>
By the way, I am also not sure whether this is what we expect:<br>
<br>
    <font color="#000000">{</font><font color="#800080">'foo'</font><font color="#000000">.</font><font color="#000000"> </font><font color="#800080">'bar'</font><font color="#000000"> </font><font color="#000080">asText</font><font color="#000000">.</font><font color="#000000"> </font><font color="#000000">UUID</font><font color="#000000"> </font><font color="#000080">new</font><font color="#000000">}</font><font color="#000000"> </font><font color="#000080">flatten</font><font color="#000000">.</font><font color="#000000"> </font><font color="#008080">"#('foo' $b $a $r 188 125 70 227 253 103 13 67 180 100 32 52 18 134 92 153)"</font><br>
<br>
Maybe also override #flatten on Text and UUID? Any other collections that we do not want to flatten? It is hard to make this decision without knowledge about the domain-specific context ... <i>:-)</i><br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font>