mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
This commit is contained in:
@@ -127,7 +127,7 @@ fn void main()
|
||||
encode(helloworld[0..12], &buffer);
|
||||
printf("Result: %s\n", &buffer);
|
||||
char *to_decode = "aGVsbG8gd29ybGRcMA==";
|
||||
char[*] result = b64"aGVsbG8gd29ybGRcMA==";
|
||||
char[?] result = b64"aGVsbG8gd29ybGRcMA==";
|
||||
decode((String)to_decode[0..19], &buffer)!!;
|
||||
printf("Result: %s\n", &buffer);
|
||||
printf("Result direct: %.*s\n", 13, &result);
|
||||
|
||||
@@ -81,7 +81,7 @@ fn void offset_momentum(Planet[] bodies)
|
||||
bodies[0].vz = - pz / SOLAR_MASS;
|
||||
}
|
||||
|
||||
Planet[*] planet_bodies = {
|
||||
Planet[?] planet_bodies = {
|
||||
{ /* sun */
|
||||
0, 0, 0, 0, 0, 0, SOLAR_MASS
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user