[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #47993] Spurious warning for throw in case expression
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #47993] Spurious warning for throw in case expression |
Date: |
Fri, 27 May 2016 22:18:59 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Update of bug #47993 (project kawa):
Status: None => Invalid
Assigned to: None => bothner
_______________________________________________________
Follow-up Comment #1:
I believe Kawa is correct.
The clause
(else => (throw 'illegal-argument))
is equivalent to:
(else ((throw 'illegal-argument) idx))
That is (throw 'illegal-argument) is evaluated to a procedure,
which is then called with the value of idx as its argument.
Since (throw 'illegal-argument) can never evaluate to a procedure, Kawa
correctly complains.
You probably want plain:
(else (throw 'illegal-argument))
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47993>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/