A malformed for crashes the compiler #42

Closed
opened 2026-10-08 18:43:05 +02:00 by alex-eg · 0 comments
Owner

sexc dfafe8b. Writing the C-style grouped header

(for ((var i int 0) (< i 4) (++ i))
  ...)

instead of (for (var i int 0) (< i 4) (++ i) ...) dies inside the
writer with no source location:

Error: (caddr) bad argument type: ()
	fmt-c-writer.scm:112: scheme#symbol->string

Expected: a diagnostic naming the file, the line and the expected shape
of for.


Found with sexc dfafe8b while building vs-map-viewer (from its Sex-field-notes.org).

sexc dfafe8b. Writing the C-style grouped header ```scheme (for ((var i int 0) (< i 4) (++ i)) ...) ``` instead of `(for (var i int 0) (< i 4) (++ i) ...)` dies inside the writer with no source location: ``` Error: (caddr) bad argument type: () fmt-c-writer.scm:112: scheme#symbol->string ``` Expected: a diagnostic naming the file, the line and the expected shape of `for`. --- Found with sexc `dfafe8b` while building vs-map-viewer (from its `Sex-field-notes.org`).
alex-eg added the bug label 2026-10-08 18:43:05 +02:00
Sign in to join this conversation.