diff dmd/STC.d @ 139:bc45b1c53019

made StorageClass type-safe
author Trass3r
date Tue, 14 Sep 2010 01:13:58 +0200
parents af1bebfd96a4
children cd48cb899aee
line wrap: on
line diff
--- a/dmd/STC.d	Tue Sep 14 00:00:24 2010 +0200
+++ b/dmd/STC.d	Tue Sep 14 01:13:58 2010 +0200
@@ -1,6 +1,6 @@
 module dmd.STC;
 
-enum STC
+enum STC : ulong
 {
     STCundefined    = 0,
     STCstatic	    = 1,
@@ -37,15 +37,15 @@
 					// but not typed as "shared"
     STCwild         = 0x80000000,	// for "wild" type constructor
     STC_TYPECTOR    = (STCconst | STCimmutable | STCshared | STCwild),
+
+    // attributes
+	STCproperty		= 0x100000000,
+	STCsafe			= 0x200000000,
+	STCtrusted		= 0x400000000,
+	STCsystem		= 0x800000000,
+	STCctfe			= 0x1000000000,	// can be used in CTFE, even if it is static
 }
+alias STC StorageClass;
 
 import dmd.EnumUtils;
-mixin(BringToCurrentScope!(STC));
-
-enum STCproperty	= 0x100000000;
-enum STCsafe		= 0x200000000;
-enum STCtrusted		= 0x400000000;
-enum STCsystem		= 0x800000000;
-enum STCctfe		= 0x1000000000;	// can be used in CTFE, even if it is static
-
-alias ulong StorageClass;
\ No newline at end of file
+mixin(BringToCurrentScope!(STC));
\ No newline at end of file