Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
850 stars 103 forks source link

Fix comma bug #407

Closed Devon7 closed 5 months ago

Devon7 commented 2 years ago

Fix bug where erroneous commas in #A, #C or #S literals create bogus values which cause errors (possibly much) later.

Before: #C(0 ,1) >> Error: The value (#:|`,| . 1) is not of the expected type REAL.

After: #C(0 ,1) >> Error: … Comma inside complex literal

Best compared sans whitespace, i.e., https://github.com/Clozure/ccl/pull/407/files?w=1

[Oops, accidentally deleted identical pull request #392]

Devon7 commented 5 months ago

Per discussion at https://bugs.launchpad.net/sbcl/+bug/309093 about this same bug (fix released 2010-03-28) imitate their more detailed error message by changing "Comma inside ~A literal" to "Comma inside backquoted ~A literal (only list or vector allowed)"

xrme commented 5 months ago

I finally see that if I actually read what you wrote, and look at the diff with "hide whitespace" on, that this is actually a pretty simple change.