diff sema/DType.d @ 80:682e20aa224f new_gen

Pointers working now - big YAY
author Anders Johnsen <skabet@gmail.com>
date Fri, 02 May 2008 17:33:50 +0200
parents 13eea2c4e60d
children 110c7e1c4ca2
line wrap: on
line diff
--- a/sema/DType.d	Fri May 02 16:39:04 2008 +0200
+++ b/sema/DType.d	Fri May 02 17:33:50 2008 +0200
@@ -90,6 +90,14 @@
      */
     bool hasImplicitConversionTo(DType that) { return false; }
 
+    DPointer getPointerTo()
+    {
+        if(myPointer !is null)
+            return myPointer;
+        myPointer = new DPointer(this);
+        return myPointer;
+    }
+
     static DInteger
         Bool,
         Byte, UByte, Short, UShort,
@@ -97,6 +105,8 @@
 
     static DType Void;
 
+    private DPointer myPointer;
+
     static this()
     {
         Void   = new DType("void");