mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 13:23:14 +01:00
[svn r191] Fixed: array literals did not support all type/storage combinations.
Fixed: with expression had broke somewhere along the way.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
void integer()
|
||||
{
|
||||
auto arr = new int[16];
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
module arrays13;
|
||||
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
void main()
|
||||
{
|
||||
string a = "hello";
|
||||
char[] a = "hello";
|
||||
|
||||
assert(a > "hel");
|
||||
assert(a >= "hel");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module arrays4;
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
int[] arr;
|
||||
@@ -10,5 +10,4 @@ void main()
|
||||
assert(arr.length == 2);
|
||||
assert(arr[0] == 3);
|
||||
assert(arr[1] == 5);
|
||||
writefln(arr);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
module arrays7;
|
||||
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
pragma(LLVM_internal, "notypeinfo")
|
||||
struct S
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
module arrays8;
|
||||
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
void main()
|
||||
{
|
||||
char[] a = "hello ";
|
||||
|
||||
@@ -10,6 +10,8 @@ void main()
|
||||
with(s)
|
||||
{
|
||||
i = 0;
|
||||
f = 3.4;
|
||||
f = 3.5;
|
||||
}
|
||||
assert(s.i == 0);
|
||||
assert(s.f == 3.5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user