Mercurial > projects > ldc
view tangotests/s.d @ 275:665b81613475 trunk
[svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
author | lindquist |
---|---|
date | Thu, 19 Jun 2008 17:30:32 +0200 |
parents | aeddd4d533b3 |
children |
line wrap: on
line source
module s; interface Inter { void inter(); } interface Inter2 { void inter2(); } interface InterOne : Inter { void interOne(); } abstract class ClassAbstract : InterOne { abstract void inter(); abstract void interOne(); } class TheClassOne : ClassAbstract { void inter() { } void interOne() { } } class TheClassTwo : TheClassOne, Inter2 { long l; double d; void inter2() { } } extern(C) int printf(char*, ...); void main() { printf("classinfo test\n"); { auto c = new TheClassOne; { auto ci = c.classinfo; printf("ci = %.*s\n", ci.name.length, ci.name.ptr); printf("ci.interfaces.length = %lu\n", ci.interfaces.length); printf("i[0] = %.*s\n", ci.interfaces[0].classinfo.name.length, ci.interfaces[0].classinfo.name.ptr); printf("i[1] = %.*s\n", ci.interfaces[1].classinfo.name.length, ci.interfaces[1].classinfo.name.ptr); } } { auto c = new TheClassTwo; { auto ci = c.classinfo; printf("ci = %.*s\n", ci.name.length, ci.name.ptr); printf("ci.interfaces.length = %lu\n", ci.interfaces.length); printf("i[0] = %.*s\n", ci.interfaces[0].classinfo.name.length, ci.interfaces[0].classinfo.name.ptr); printf("i[1] = %.*s\n", ci.interfaces[1].classinfo.name.length, ci.interfaces[1].classinfo.name.ptr); printf("i[2] = %.*s\n", ci.interfaces[2].classinfo.name.length, ci.interfaces[2].classinfo.name.ptr); } auto i = cast(InterOne)c; { auto ci = i.classinfo; printf("ci = %.*s\n", ci.name.length, ci.name.ptr); } auto i2 = cast(Inter2)i; { auto ci = i2.classinfo; printf("ci = %.*s\n", ci.name.length, ci.name.ptr); } auto o = cast(Object)i2; { auto ci = o.classinfo; printf("ci = %.*s\n", ci.name.length, ci.name.ptr); } } }