view src/tests/forward02.d @ 806:bcb74c9b895c

Moved out files in the trunk folder to the root.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 09 Mar 2008 00:12:19 +0100
parents trunk/src/tests/forward02.d@2a690956cf1c
children
line wrap: on
line source

/++
  Author: Jari-Matti Mäkelä
+/

// Valid circular composition because of pointer.
struct A { B* b; }
struct B { A a; }
// Equivalent to:
struct A { A* a; }

// Valid circular composition because classes are reference types.
class C { D d; }
class D { C c; }