mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
19 lines
308 B
D
19 lines
308 B
D
// simple test of recursive types.
|
|
module llvmsample2;
|
|
|
|
import llvm.llvm;
|
|
|
|
void main()
|
|
{
|
|
auto th = new TypeHandle();
|
|
auto s = StructType.Get([ PointerType.Get(th.resolve) ], false);
|
|
th.refine(s);
|
|
s.dump();
|
|
th.dispose();
|
|
|
|
auto t = getTypeOf(s.ll);
|
|
t.dump();
|
|
|
|
assert(s is t);
|
|
}
|