Index: trunk/abdev/BasicCompiler32/CParameter.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 292)
@@ -213,4 +213,34 @@
 			dummyType = *params[i2];
 			bByVal = ( params[i2]->IsRef() == false ) ? TRUE:FALSE;
+
+
+			/////////////////////////////////////////////////////////
+			// ☆★☆ ジェネリクスサポート ☆★☆
+
+			if( dummyType.IsTypeParameter() )
+			{
+				// 型パラメータだったとき
+
+				int ptrLevel = PTR_LEVEL( dummyType.GetBasicType() );
+
+				if( leftType.HasActualGenericType() )
+				{
+					// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
+					dummyType = leftType.GetDummyActualGenericType();
+				}
+				else
+				{
+					// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
+					dummyType.SetBasicType( DEF_OBJECT );
+				}
+
+				for( int i=0; i<ptrLevel; i++ )
+				{
+					dummyType.PtrLevelUp();
+				}
+			}
+
+			//
+			/////////////////////////////////////////////////////////
 		}
 
Index: trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 292)
@@ -104,4 +104,5 @@
 	const CClass *pobj_c = NULL;
 	const CMethod *pMethod = NULL;
+	Type leftType;
 	if( pUserProc->GetParentClassPtr() ){
 		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
@@ -118,4 +119,5 @@
 				{
 					pobj_c = &varType.GetClass();
+					leftType = varType;
 				}
 				else
@@ -222,4 +224,7 @@
 	pobj_parameter->ApplyDefaultParameters( pUserProc->RealParams() );
 
+	// 型パラメータを適用
+	pobj_parameter->SetLeftType( leftType );
+
 	//エラーチェック
 	if( !pobj_parameter->ErrorCheck(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetSecondParmNum() ) ){
Index: trunk/abdev/BasicCompiler32/Compile_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 292)
@@ -230,4 +230,7 @@
 	{
 		// 型パラメータだったとき
+
+		int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
 		if( classType.HasActualGenericType() )
 		{
@@ -239,4 +242,9 @@
 			// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
 			resultType.SetBasicType( DEF_OBJECT );
+		}
+
+		for( int i=0; i<ptrLevel; i++ )
+		{
+			resultType.PtrLevelUp();
 		}
 	}
@@ -436,4 +444,26 @@
 			pSubscripts = &pVar->GetSubscripts();
 			bConst = pVar->IsConst();
+
+
+			/////////////////////////////////////////////////////////
+			// ☆★☆ ジェネリクスサポート ☆★☆
+
+			if( resultType.IsTypeParameter() )
+			{
+				// 型パラメータだったとき
+
+				int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
+				// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
+				resultType.SetBasicType( DEF_OBJECT );
+
+				for( int i=0; i<ptrLevel; i++ )
+				{
+					resultType.PtrLevelUp();
+				}
+			}
+
+			//
+			/////////////////////////////////////////////////////////
 
 			goto ok;
Index: trunk/abdev/BasicCompiler32/NumOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 292)
@@ -228,4 +228,7 @@
 				{
 					// 型パラメータだったとき
+
+					int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
 					if( leftType.HasActualGenericType() )
 					{
@@ -237,4 +240,9 @@
 						// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
 						resultType.SetBasicType( DEF_OBJECT );
+					}
+
+					for( int i=0; i<ptrLevel; i++ )
+					{
+						resultType.PtrLevelUp();
 					}
 				}
@@ -253,5 +261,5 @@
 	char parameter[VN_SIZE];
 
-	if( (string)term=="a.x")
+	if( (string)term=="a[1]")
 	{
 		int test=0;
@@ -447,7 +455,9 @@
 	GetArrayElement(termFull,VarName,ArrayElements);
 	if(ArrayElements[0]){
-		GetVarType(VarName,resultType,false);
-		if( resultType.IsObject() ){
-			CallIndexerGetterProc(/*UseReg,*/&resultType.GetClass(),VarName,ArrayElements,resultType);
+		Type leftType;
+		GetVarType(VarName,leftType,false);
+		if( leftType.IsObject() )
+		{
+			CallIndexerGetterProc(/*UseReg,*/&resultType.GetClass(),VarName, leftType, ArrayElements,resultType);
 
 			isLiteral = false;
Index: trunk/abdev/BasicCompiler32/Opcode.h
===================================================================
--- trunk/abdev/BasicCompiler32/Opcode.h	(revision 291)
+++ trunk/abdev/BasicCompiler32/Opcode.h	(revision 292)
@@ -175,4 +175,5 @@
 	int ParmsNum;
 
+	Type leftType;
 	Type returnType;
 
@@ -186,4 +187,8 @@
 	ParamImpl(const Parameters &params);
 	~ParamImpl();
+	void SetLeftType( const Type &type )
+	{
+		this->leftType = type;
+	}
 	void SetReturnType( const Type &returnType );
 
@@ -222,5 +227,5 @@
 int CallOperatorProc(int idCalc, const Type &baseType, int *type_stack,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp);
 void CallCastOperatorProc(Type &calcType,BOOL bCalcUseHeap,const Type &toType);
-void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName,char *Parameter,Type &resultType);
+void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName, const Type &leftType, char *Parameter,Type &resultType);
 
 //Compile_Statement.cpp
Index: trunk/abdev/BasicCompiler32/OperatorProc.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/OperatorProc.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler32/OperatorProc.cpp	(revision 292)
@@ -252,5 +252,5 @@
 	SetError(-1,"キャスト演算子がオーバーロードされていません。",cp);
 }
-void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName,char *Parameter,Type &resultType){
+void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName, const Type &leftType, char *Parameter,Type &resultType){
 	std::vector<const UserProc *> subs;
 	pobj_Class->GetMethods().Enum( CALC_ARRAY_GET, subs );
@@ -261,3 +261,33 @@
 	Opcode_CallProc(Parameter,subs[0],0,ObjectName);
 	resultType = subs[0]->ReturnType();
-}
+
+
+	/////////////////////////////////////////////////////////
+	// ☆★☆ ジェネリクスサポート ☆★☆
+
+	if( resultType.IsTypeParameter() )
+	{
+		// 型パラメータだったとき
+
+		int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
+		if( leftType.HasActualGenericType() )
+		{
+			// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
+			resultType = leftType.GetDummyActualGenericType();
+		}
+		else
+		{
+			// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
+			resultType.SetBasicType( DEF_OBJECT );
+		}
+
+		for( int i=0; i<ptrLevel; i++ )
+		{
+			resultType.PtrLevelUp();
+		}
+	}
+
+	//
+	/////////////////////////////////////////////////////////
+}
Index: trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 292)
@@ -301,5 +301,10 @@
 }
 
-bool GetTermType( const char *term, Type &resultType, bool &isLiteral, bool *pIsClassName ){
+bool GetTermType( const char *term, Type &resultType, bool &isLiteral, bool *pIsClassName )
+{
+	if( (string)term=="a[1]")
+	{
+		int test=0;
+	}
 	char parameter[VN_SIZE];
 
@@ -390,4 +395,7 @@
 				{
 					// 型パラメータだったとき
+
+					int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
 					if( leftType.HasActualGenericType() )
 					{
@@ -399,4 +407,9 @@
 						// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
 						resultType.SetBasicType( DEF_OBJECT );
+					}
+
+					for( int i=0; i<ptrLevel; i++ )
+					{
+						resultType.PtrLevelUp();
 					}
 				}
@@ -513,7 +526,8 @@
 	GetArrayElement(termFull,VarName,ArrayElements);
 	if(ArrayElements[0]){
-		GetVarType(VarName,resultType,false);
-		if( resultType.IsObject() ){
-			if( !GetReturnTypeOfIndexerGetterProc( resultType.GetClass(),resultType) ){
+		Type classType;
+		GetVarType(VarName,classType,false);
+		if( classType.IsObject() ){
+			if( !GetReturnTypeOfIndexerGetterProc( classType, resultType ) ){
 				SetError(1,NULL,cp);
 				return false;
Index: trunk/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 292)
@@ -228,4 +228,36 @@
 
 		resultType = pUserProc->ReturnType();
+
+		Type leftType;
+		GetVarType( ObjectName, leftType, false );
+
+		/////////////////////////////////////////////////////////
+		// ☆★☆ ジェネリクスサポート ☆★☆
+
+		if( resultType.IsTypeParameter() )
+		{
+			// 型パラメータだったとき
+
+			int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
+			if( leftType.HasActualGenericType() )
+			{
+				// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
+				resultType = leftType.GetDummyActualGenericType();
+			}
+			else
+			{
+				// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
+				resultType.SetBasicType( DEF_OBJECT );
+			}
+
+			for( int i=0; i<ptrLevel; i++ )
+			{
+				resultType.PtrLevelUp();
+			}
+		}
+
+		//
+		/////////////////////////////////////////////////////////
 	}
 
@@ -274,7 +306,8 @@
 
 //インデクサ（getter）の戻り値を取得
-bool GetReturnTypeOfIndexerGetterProc( const CClass &objClass, Type &resultType ){
+bool GetReturnTypeOfIndexerGetterProc( const Type &classType, Type &resultType )
+{
 	vector<const UserProc *> subs;
-	objClass.GetMethods().Enum( CALC_ARRAY_GET, subs );
+	classType.GetClass().GetMethods().Enum( CALC_ARRAY_GET, subs );
 	if( subs.size() == 0 ){
 		return false;
@@ -282,4 +315,34 @@
 
 	resultType = subs[0]->ReturnType();
+
+
+	/////////////////////////////////////////////////////////
+	// ☆★☆ ジェネリクスサポート ☆★☆
+
+	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();
+		}
+	}
+
+	//
+	/////////////////////////////////////////////////////////
 
 	return true;
Index: trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 292)
@@ -480,4 +480,7 @@
 	{
 		// 型パラメータだったとき
+
+		int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
 		if( classType.HasActualGenericType() )
 		{
@@ -489,4 +492,9 @@
 			// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
 			resultType.SetBasicType( DEF_OBJECT );
+		}
+
+		for( int i=0; i<ptrLevel; i++ )
+		{
+			resultType.PtrLevelUp();
 		}
 	}
Index: trunk/abdev/BasicCompiler_Common/common.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/common.h	(revision 291)
+++ trunk/abdev/BasicCompiler_Common/common.h	(revision 292)
@@ -356,5 +356,5 @@
 bool CallPropertyMethod( const char *variable, const char *rightSide, Type &resultType);
 bool GetReturnTypeOfPropertyMethod( const char *variable, const char *rightSide, Type &resultType );
-bool GetReturnTypeOfIndexerGetterProc( const CClass &objClass, Type &resultType );
+bool GetReturnTypeOfIndexerGetterProc( const Type &classType, Type &resultType );
 int AddProcPtrInfo( const string &typeExpression, int nowLine );
 bool IsNeedProcCompile();
Index: trunk/abdev/BasicCompiler_Common/src/Type.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Type.cpp	(revision 291)
+++ trunk/abdev/BasicCompiler_Common/src/Type.cpp	(revision 292)
@@ -408,5 +408,5 @@
 bool Type::IsTypeParameter() const
 {
-	return ( basicType == DEF_TYPE_PARAMETER );
+	return ( NATURAL_TYPE(basicType) == DEF_TYPE_PARAMETER );
 }
 bool Type::IsObjectClass() const
