Index: trunk/abdev/BasicCompiler_Common/src/Class.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Class.cpp	(revision 282)
+++ trunk/abdev/BasicCompiler_Common/src/Class.cpp	(revision 290)
@@ -908,66 +908,64 @@
 			source[i+1]==ESC_TYPE||
 			source[i+1]==ESC_INTERFACE
-			)){
-				int nowLine;
-				nowLine=i;
+			))
+		{
+			int nowLine = i;
+			i += 2;
+
+			Type blittableType;
+			if(memicmp(source.GetBuffer()+i,"Align(",6)==0){
+				//アラインメント修飾子
+				i+=6;
+				i=JumpStringInPare(source.GetBuffer(),i)+1;
+			}
+			else if( memicmp( source.GetBuffer() + i, "Blittable(", 10 ) == 0 ){
+				// Blittable修飾子
+				i+=10;
+				i+=GetStringInPare_RemovePare(temporary,source.GetBuffer()+i)+1;
+				compiler.StringToType( temporary, blittableType );
+			}
+
+			bool isEnum = false;
+			if( source[i] == 1 && source[i+1] == ESC_ENUM ){
+				// 列挙型の場合
+				isEnum = true;
 
 				i+=2;
-				Type blittableType;
-				if(memicmp(source.GetBuffer()+i,"Align(",6)==0){
-					//アラインメント修飾子
-					i+=6;
-					i=JumpStringInPare(source.GetBuffer(),i)+1;
-				}
-				else if( memicmp( source.GetBuffer() + i, "Blittable(", 10 ) == 0 ){
-					// Blittable修飾子
-					i+=10;
-					i+=GetStringInPare_RemovePare(temporary,source.GetBuffer()+i)+1;
-					compiler.StringToType( temporary, blittableType );
-				}
-
-				bool isEnum = false;
-				if( source[i] == 1 && source[i+1] == ESC_ENUM ){
-					// 列挙型の場合
-					isEnum = true;
-
-					i+=2;
-				}
-
-				int i2;
-				char temporary[VN_SIZE];
-				for(i2=0;;i++,i2++){
-					if(!IsVariableChar(source[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=source[i];
-				}
-
-				//クラスを追加
-				CClass *pClass = this->Add(namespaceScopes, importedNamespaces, temporary,nowLine);
-				if( pClass ){
-					if( source[nowLine+1] == ESC_CLASS ){
-						if( isEnum ){
-							pClass->SetClassType( CClass::Enum );
-						}
-						else{
-							pClass->SetClassType( CClass::Class );
-						}
-					}
-					else if( source[nowLine+1] == ESC_INTERFACE ){
-						pClass->SetClassType( CClass::Interface );
+			}
+
+			for(i2=0;;i++,i2++){
+				if(!IsVariableChar(source[i])){
+					temporary[i2]=0;
+					break;
+				}
+				temporary[i2]=source[i];
+			}
+
+			//クラスを追加
+			CClass *pClass = this->Add(namespaceScopes, importedNamespaces, temporary,nowLine);
+			if( pClass ){
+				if( source[nowLine+1] == ESC_CLASS ){
+					if( isEnum ){
+						pClass->SetClassType( CClass::Enum );
 					}
 					else{
-						pClass->SetClassType( CClass::Structure );
+						pClass->SetClassType( CClass::Class );
 					}
 				}
-
-				// Blittable型の場合
-				if( !blittableType.IsNull() ){
-					pClass->SetBlittableType( blittableType );
-
-					// Blittable型として登録
-					compiler.GetObjectModule().meta.GetBlittableTypes().push_back( BlittableType( blittableType, pClass ) );
-				}
+				else if( source[nowLine+1] == ESC_INTERFACE ){
+					pClass->SetClassType( CClass::Interface );
+				}
+				else{
+					pClass->SetClassType( CClass::Structure );
+				}
+			}
+
+			// Blittable型の場合
+			if( !blittableType.IsNull() ){
+				pClass->SetBlittableType( blittableType );
+
+				// Blittable型として登録
+				compiler.GetObjectModule().meta.GetBlittableTypes().push_back( BlittableType( blittableType, pClass ) );
+			}
 		}
 	}
@@ -1266,4 +1264,6 @@
 			if(!pobj_c) continue;
 
+			compiler.pCompilingClass = pobj_c;
+
 			if(lpszInheritsClass){
 				if( pobj_c->GetName() != lpszInheritsClass ){
@@ -1277,4 +1277,27 @@
 				continue;
 			}
+
+
+			/////////////////////////////////////////////////////////
+			// ☆★☆ ジェネリクスサポート ☆★☆
+			if( basbuf[i] == '<' )
+			{
+				// 型パラメータを取得
+				i++;
+				GetIdentifierToken( temporary, basbuf, i );
+
+				pobj_c->AddFormalGenericType( GenericType( temporary, Type(DEF_OBJECT,*GetObjectClassPtr()) ) );
+
+				if( basbuf[i] == '>' )
+				{
+					i++;
+				}
+				else
+				{
+					SetError();
+				}
+			}
+			/////////////////////////////////////////////////////////
+
 
 			pobj_c->SetFixedAlignment( iAlign );
