mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-22 07:43:18 +01:00
[svn r104] TONS OF FIXES.
Split up declaration, constant initializer gen and definition for globals, structs, classes and functions. Improved ClassInfo support (not complete), not in vtable yet. Fixed a bunch of forward reference problems. Much more. Major commit! :)
This commit is contained in:
16
test/arrays13.d
Normal file
16
test/arrays13.d
Normal file
@@ -0,0 +1,16 @@
|
||||
module arrays13;
|
||||
|
||||
void main()
|
||||
{
|
||||
string a = "hello";
|
||||
|
||||
assert(a > "hel");
|
||||
assert(a >= "hel");
|
||||
assert(a < "helloo");
|
||||
assert(a <= "helloo");
|
||||
assert(a > "betty");
|
||||
assert(a >= "betty");
|
||||
assert(a == "hello");
|
||||
assert(a <= "hello");
|
||||
assert(a >= "hello");
|
||||
}
|
||||
@@ -7,4 +7,4 @@ void main()
|
||||
arr.sort;
|
||||
writefln("arr.sort = ",arr);
|
||||
assert(arr == [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]);
|
||||
}
|
||||
}
|
||||
|
||||
10
test/bug63.d
Normal file
10
test/bug63.d
Normal file
@@ -0,0 +1,10 @@
|
||||
module bug63;
|
||||
|
||||
void main()
|
||||
{
|
||||
static void notnested()
|
||||
{
|
||||
printf("hello world\n");
|
||||
}
|
||||
notnested();
|
||||
}
|
||||
5
test/bug66.d
Normal file
5
test/bug66.d
Normal file
@@ -0,0 +1,5 @@
|
||||
module bug66;
|
||||
import std.stdio;
|
||||
class Scene { string name() { return "Scene"; } }
|
||||
class Group : Scene { this () { } }
|
||||
void main() { writefln((new Group).name); }
|
||||
@@ -6,5 +6,5 @@ class C
|
||||
|
||||
void main()
|
||||
{
|
||||
auto ci = C.classinfo;
|
||||
ClassInfo ci = C.classinfo;
|
||||
}
|
||||
|
||||
15
test/structs7.d
Normal file
15
test/structs7.d
Normal file
@@ -0,0 +1,15 @@
|
||||
module structs7;
|
||||
|
||||
pragma(LLVM_internal, "notypeinfo")
|
||||
struct S
|
||||
{
|
||||
int i;
|
||||
long l;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
S s = void;
|
||||
int i = s.i;
|
||||
long l = s.l;
|
||||
}
|
||||
@@ -6,17 +6,18 @@ class C
|
||||
{
|
||||
}
|
||||
|
||||
void func()
|
||||
void func(bool b)
|
||||
{
|
||||
if (rand() & 1)
|
||||
if (b)
|
||||
throw new C;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
bool b = true;
|
||||
try
|
||||
{
|
||||
func();
|
||||
func(b);
|
||||
}
|
||||
catch(Object)
|
||||
{
|
||||
|
||||
@@ -4,11 +4,11 @@ typedef int int_t;
|
||||
|
||||
void main()
|
||||
{
|
||||
int_t i;
|
||||
/*int_t i;
|
||||
auto ti = typeid(typeof(i));
|
||||
printf("%s\n",ti.toString.ptr);
|
||||
assert(ti.toString() == "typeinfo3.int_t");
|
||||
assert(ti.next !is null);
|
||||
assert(ti.next.toString() == "int");
|
||||
assert(ti.init is null);
|
||||
assert(ti.init is null);*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user