jakt
jakt copied to clipboard
typechecker: Typecheck format-strings and don't allocate them as Strings
This will stop us from writing illegal format-strings, which would otherwise cause segfaults at runtime.
Hmm, I'm trying to remember - I thought we didn't want indexing of strings because we wanted to move to utf8?
Made is use String::byte_at
now
Update, now works on println
etc and the format string on its own should not allocate anymore
I think I fixed it up with the new layout and made it work with the interpreter, @alimpfard can you check this again?
First commit lgtm, but as I said before, I don't like the entirely separate expression type, it's a hack on top of a hack (specialised typecheck for format) meant to bypass another hack (no overloaded strings or literal "optimisation") - that's too many hacks.
Well then I will drop that part for now...
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!