Summary
Only the last clause in COND may be an ELSE clause
Metadata
- Id: c675be32692601fd9ccb6a8454f5e830974bda58
- Trac id: 192
- Type: defect
- Reporter: zbigniew
- Owner:
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone: 4.5.0
- Version:
- Changetime: 2010-04-05 21:10:24 UTC
- Created: 2010-03-26 04:41:42 UTC
- Keywords:
Attachments
- c675be32692601fd9ccb6a8454f5e830974bda58/attachments/0001-Only-the-last-clause-in-COND-may-be-an-ELSE-clause.patch
- c675be32692601fd9ccb6a8454f5e830974bda58/attachments/0002-Remove-extraneous-char-in-scripts-wiki2html.scm.patch
Description
And patch 0001 will throw a syntax error if additional clauses are found.
Patch 0002 removes an extraneous character in wiki2html.scm, which is now illegal after patch 0001.
Changes and comments
[2010-03-26 04:41:50 UTC] zbigniew attached 0001-Only-the-last-clause-in-COND-may-be-an-ELSE-clause.patch (description=#f)
[2010-03-26 04:41:58 UTC] zbigniew attached 0002-Remove-extraneous-char-in-scripts-wiki2html.scm.patch (description=#f)
[2010-03-27 11:17:05 UTC] felix wrote:
Thanks for the patches. The latter will be committed in a short while, the former... I'm not sure. It can be convenient for macros to have the option to provide a default `else` clause, without having to worry about previous occurrences.
[2010-04-04 23:03:36 UTC] felix wrote:
I think multiple `else` clauses should be allowed which makes it easier to provide default clauses in macros that expand to `cond` or `case`. But I have added checks in `cond`, `case`, and `select` that will issue a warning when a non-else clause follows an else-clause and all clauses are checked for being syntactically correct (formerly the clauses after the first `else` were just dropped). Perhaps that is an acceptable compromise. If yes, please close the ticket.
See commit b9d091df90f6092573eaf36c22436daa7ef2085f (experimental)
[2010-04-05 21:10:24 UTC] zbigniew changed status from new to closed
[2010-04-05 21:10:24 UTC] zbigniew set resolution to fixed
[2010-04-05 21:10:24 UTC] zbigniew wrote:
This sounds like a great solution.