sasagawa888 / eisl

ISLisp interpreter/compiler
Other
272 stars 22 forks source link

Attempting to coerce a character to a string does not raise an error #253

Closed gtnoble closed 1 year ago

gtnoble commented 1 year ago

Attempting to coerce a character to a string should raise an error, according to the ISLisp specification: https://minejima.jp/ISLispHyperDraft/islisp-v23.html#declarations_and_coercions convert currently returns a string with the character in it.

>>(convert #\k <string>)
"k"
sasagawa888 commented 1 year ago

Thank you for your comment. You are correct. I made Easy-ISLISP compiler at stage with this incompatibility. Later I found out that. But I didn't want to fix the compiler, so I left it as is. There is a description in verify/declare.lsp.

L55 ‘‘‘ ;;; caution ;;; In Easy-ISLisp extened char -> string. this is for compiler. ;($error (convert #\a ) ) ‘‘‘

sasagawa888 commented 1 year ago

Fixed.