<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>there are two problems with #caseError.</p>
<p><br>
</p>
<p>First one:</p>
<p>Given the following example, you will receive a confusing error message:</p>
<p><br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>#foo caseOf: {[#bar] -> [2]. [#baz] -> [3]} </span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>"--> Error: Case not found (nil), and no otherwise clause"</span></div>
</div>
</div>
</div>
</div>
</blockquote>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Either #caseError should be called on #foo, then this would be compiler bug.</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Otherwise, I don't see any reason to print out the receiver. We could also name it #caseError: anObject and print out this object, but the current message is not helpful IMO ...</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody">Second one:</div>
<div class="_rp_T4" id="Item.MessagePartBody">I'm not sure whether it is expected behavior how #allLiterals works on the following example:</div>
<div class="_rp_T4" id="Item.MessagePartBody"><br>
</div>
</div>
</div>
</div>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div>method := Compiler new</div>
<div><span style="white-space:pre"></span>compiledMethodFor: '#bar caseOf: {[#bar] -> [2]}'</div>
<div><span style="white-space:pre"></span>in: nil to: nil notifying: nil ifFail: nil.</div>
<div>method allLiterals.</div>
"--> <span> #(#caseError #bar #caseOf:)"</span></div>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</body>
</html>