Mercurial > projects > dang
view tests/code/basic_1.d @ 161:0e10479623f6
Changed the tests for static arrays a little
The following code IS legal:
int[10] a;
int[10] b = a;
It's only assignment outside of init thats illegal
Also a test for a[] = b, which should compile to a memcpy
author | Anders Halager <halager@gmail.com> |
---|---|
date | Tue, 22 Jul 2008 13:39:15 +0200 |
parents | 2c5a8f4c254a |
children |
line wrap: on
line source
int x = 4; int main() { long var1 = 1; short var2 = 2; nice(var1, var2); return var2; } int nice(long s, short t) { byte x = 5 + t; t = 5 + 1 * 5 * s + t; return 2 * (t + -1) - x; }