Index: trunk/abdev/BasicCompiler32/CParameter.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 301)
@@ -159,5 +159,5 @@
 }
 
-int ParamImpl::SetParameter( const string &procName, const Parameters &params, int SecondParmNum ){
+int ParamImpl::SetParameter( const string &procName, const Parameters &params, int SecondParmNum, const UserProc *pUserProc ){
 	if( SecondParmNum == -1 ) SecondParmNum = (int)params.size();
 
@@ -215,5 +215,5 @@
 
 			// 型パラメータを解決
-			ResolveFormalGenericTypeParameter( dummyType, leftType );
+			ResolveFormalGenericTypeParameter( dummyType, leftType, pUserProc );
 		}
 
Index: trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 301)
@@ -244,5 +244,5 @@
 
 	//レジスタ、スタックフレームにセット
-	int ParmSize = pobj_parameter->SetParameter(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum() );
+	int ParmSize = pobj_parameter->SetParameter(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum(), pUserProc );
 
 	if(pUserProc->ReturnType().IsStruct() ){
Index: trunk/abdev/BasicCompiler32/Compile_Func.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 301)
@@ -357,15 +357,4 @@
 
 	SetVarPtrToEax(&RelativeVar);
-
-	// TODO: 取り除く（この動きはObjPtrに託す）
-	/*
-	if( beforeType == DEF_OBJECT && lstrcmpi( Parameter, "This" ) != 0 ){
-		//参照をオブジェクトポインタに変更
-
-		//mov eax,dword ptr[eax]
-		compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
-
-		SetError(-120,NULL,cp);
-	}*/
 }
 void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn ){
Index: trunk/abdev/BasicCompiler32/Compile_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 301)
@@ -726,8 +726,10 @@
 		}
 
+		Type classType( resultType );
+
 		if(!_member_offset(
 			isErrorEnabled,
 			isWriteAccess,
-			resultType,
+			classType,
 			member,pRelativeVar,resultType,0)) return false;
 
Index: trunk/abdev/BasicCompiler32/NumOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 301)
@@ -233,9 +233,4 @@
 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool isWantObject, bool *pIsClassName, bool isProcedureCallOnly ){
 	char parameter[VN_SIZE];
-
-	if( (string)term=="a[1]")
-	{
-		int test=0;
-	}
 
 	// Withを解決
Index: trunk/abdev/BasicCompiler32/Opcode.h
===================================================================
--- trunk/abdev/BasicCompiler32/Opcode.h	(revision 300)
+++ trunk/abdev/BasicCompiler32/Opcode.h	(revision 301)
@@ -203,5 +203,5 @@
 	void MacroParameterSupport( const Parameters &params );
 	void SetStructParameter( const Type &baseType, const char *expression );
-	int SetParameter( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+	int SetParameter( const string &procName, const Parameters &params, int SecondParmNum = -1, const UserProc *pUserProc = NULL );
 
 	//一時オブジェクトパラメータの生成と破棄
Index: trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 301)
@@ -303,8 +303,4 @@
 bool GetTermType( const char *term, Type &resultType, bool &isLiteral, bool *pIsClassName )
 {
-	if( (string)term=="a[1]")
-	{
-		int test=0;
-	}
 	char parameter[VN_SIZE];
 
Index: trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 301)
@@ -473,33 +473,6 @@
 	resultType = pMember->GetType();
 
-
-	/////////////////////////////////////////////////////////
-	// ☆★☆ ジェネリクスサポート ☆★☆
-
-	if( resultType.IsTypeParameter() )
-	{
-		// 型パラメータだったとき
-
-		int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
-
-		if( classType.HasActualGenericType() )
-		{
-			// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
-			resultType = classType.GetDummyActualGenericType();
-		}
-		else
-		{
-			// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
-			resultType.SetBasicType( DEF_OBJECT );
-		}
-
-		for( int i=0; i<ptrLevel; i++ )
-		{
-			resultType.PtrLevelUp();
-		}
-	}
-
-	//
-	/////////////////////////////////////////////////////////
+	// 型パラメータを解決
+	ResolveFormalGenericTypeParameter( resultType, classType );
 
 
@@ -838,5 +811,5 @@
 
 		for(i+=2,i2=0;;i++,i2++){
-			if(buffer[i]==','||buffer[i]=='('||buffer[i]=='\0'){
+			if(buffer[i]=='('||buffer[i]=='\0'){
 				temporary[i2]=0;
 				break;
@@ -868,9 +841,4 @@
 		}
 
-		if( (string)temporary == "T" )
-		{
-			int test=0;
-		}
-
 		if( !compiler.StringToType( temporary, type ) ){
 			SetError(3,temporary,cp);
@@ -1160,4 +1128,19 @@
 			continue;
 		}
+		if( Parameter[i] == '<' && IsStr == 0 )
+		{
+			if( IsGenericTypeSourcePart( Parameter + i ) )
+			{
+				// ジェネリクス構文
+				i3=GetStringInGenericBracket(temporary+i2,Parameter+i);
+				i+=i3-1;
+				i2+=i3-1;
+				continue;
+			}
+			else
+			{
+				// 一般構文
+			}
+		}
 		if((Parameter[i]==','&&IsStr==0)||
 			Parameter[i]=='\0'){
Index: trunk/abdev/BasicCompiler_Common/include/Type.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Type.h	(revision 300)
+++ trunk/abdev/BasicCompiler_Common/include/Type.h	(revision 301)
@@ -227,5 +227,5 @@
 
 	// 未完成
-	const Type &GetDummyActualGenericType() const;
+	const Type &GetActualGenericType( int index ) const;
 	bool HasActualGenericType() const;
 
Index: trunk/abdev/BasicCompiler_Common/src/Compiler.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 301)
@@ -28,18 +28,39 @@
 		// ジェネリッククラスをインスタンス化した型の場合
 		int i = 0;
-		char className[VN_SIZE], typeParameter[VN_SIZE];
+		char className[VN_SIZE];
 		GetIdentifierToken( className, typeName.c_str(), i );
-		i++;
-		GetIdentifierToken( typeParameter, typeName.c_str(), i );
 
 		// ジェネリクスクラスを取得
 		const CClass *pGenericClass = this->GetObjectModule().meta.GetClasses().Find( className );
 
-		// 型パラメータの型情報を取得
-		Type baseType;
-		StringToType( typeParameter, baseType );
+		if( !pGenericClass )
+		{
+			Jenga::Throw( "StringToType内のジェネリクスクラス取得部分でpGenericClassがNULL" );
+		}
+
+		if( typeName[i] != '<' )
+		{
+			Jenga::Throw( "StringToType内でジェネリクス構文の解析に失敗" );
+		}
 
 		GenericTypes genericTypes;
-		genericTypes.push_back( GenericType( "(non support)", baseType ) );
+		while( true )
+		{
+			i++;
+
+			char typeParameter[VN_SIZE];
+			GetIdentifierToken( typeParameter, typeName.c_str(), i );
+
+			// 型パラメータの型情報を取得
+			Type baseType;
+			StringToType( typeParameter, baseType );
+
+			genericTypes.push_back( GenericType( "(non support)", baseType ) );
+
+			if( typeName[i] != ',' )
+			{
+				break;
+			}
+		}
 
 		// 基本型をセット
Index: trunk/abdev/BasicCompiler_Common/src/Type.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Type.cpp	(revision 300)
+++ trunk/abdev/BasicCompiler_Common/src/Type.cpp	(revision 301)
@@ -455,7 +455,7 @@
 }
 
-const Type &Type::GetDummyActualGenericType() const
-{
-	return actualGenericTypes[0].GetType();
+const Type &Type::GetActualGenericType( int index ) const
+{
+	return actualGenericTypes[index].GetType();
 }
 bool Type::HasActualGenericType() const
@@ -515,4 +515,5 @@
 					if( pClass->GetSuperClassActualTypeParameters().size() )
 					{
+						// TODO: 適切な形に実装し直す（暫定的にトップの型を持ってきている）
 						typeParameter = pClass->GetSuperClassActualTypeParameters()[0];
 					}
@@ -526,6 +527,5 @@
 			if( classType.HasActualGenericType() )
 			{
-				// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
-				typeParameter = classType.GetDummyActualGenericType();
+				typeParameter = classType.GetActualGenericType( typeParameter.GetFormalTypeIndex() );
 			}
 			else
