This repository was archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
String subscript in C# should be converted to int #19
Comments
dubek
added a commit
to dubek/mal
that referenced
this issue
Nov 20, 2016
See http://skew-lang.org/ for details on the Skew language. Currently Mal only compiles to Javascript, as there are some issues with the C# backend for Skew (evanw/skew#19). Tested with Skew 0.7.42.
dubek
added a commit
to dubek/mal
that referenced
this issue
Nov 20, 2016
See http://skew-lang.org/ for details on the Skew language. Currently Mal only compiles to Javascript, as there are some issues with the C# backend for Skew (evanw/skew#19). Tested with Skew 0.7.42.
dubek
added a commit
to dubek/mal
that referenced
this issue
Nov 20, 2016
See http://skew-lang.org/ for details on the Skew language. Currently Mal only compiles to Javascript, as there are some issues with the C# backend for Skew (evanw/skew#19). Tested with Skew 0.7.42.
Trying to understand how skew code generation works I did this change to csharp.sk:
But probably it also need to cast in other places a string index is used (like in comparisons and assignments). |
micfan
pushed a commit
to micfan/make-a-lisp
that referenced
this issue
Nov 8, 2018
See http://skew-lang.org/ for details on the Skew language. Currently Mal only compiles to Javascript, as there are some issues with the C# backend for Skew (evanw/skew#19). Tested with Skew 0.7.42.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Consider this Skew program:
It compiles to JS and runs OK (no assertion). However, when compiling to C# and then to exe, the Mono compiler
mcs
yells:The resulting C# program is:
The problem is that
s[0]
in C# returns a char; inside the case statement this is not automatically casted to int (whereas in==
expressions it is). Maybe instead ofs[0]
skewc should emit something along the lines of Javascript'ss.charCodeAt(0)
(I don't know C#, sorry).The text was updated successfully, but these errors were encountered: