Index: trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 288)
+++ trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 290)
@@ -124,56 +124,4 @@
 	return type;
 }
-int GetTypeSize(int type,LONG_PTR lpIndex){
-	if(type==DEF_LONG){
-		if(lpIndex==LITERAL_NULL||lpIndex==LITERAL_M128_0||lpIndex==LITERAL_0_255)
-			return sizeof(BYTE);
-		else if(lpIndex==LITERAL_M32768_0||lpIndex==LITERAL_0_65535)
-			return sizeof(WORD);
-
-		return sizeof(DWORD);
-	}
-
-	//整数型
-	if(type==DEF_INT64||type==DEF_QWORD)
-		return sizeof(_int64);
-	else if(type==DEF_LONG||type==DEF_DWORD)
-		return sizeof(DWORD);
-	else if(type==DEF_INTEGER||type==DEF_WORD)
-		return sizeof(WORD);
-	else if(type==DEF_SBYTE||type==DEF_BYTE || type == DEF_BOOLEAN)
-		return sizeof(BYTE);
-
-	//実数型
-	else if(type==DEF_DOUBLE)		return sizeof(double);
-	else if(type==DEF_SINGLE)		return sizeof(float);
-
-	//文字型
-	else if( type == DEF_CHAR ){
-		if( Smoothie::IsUnicode() ) return sizeof( WORD );
-		return sizeof( BYTE );
-	}
-
-	//ポインタ型
-	else if(IsPtrType(type))		return PTR_SIZE;
-
-	else if( type == DEF_STRUCT ){
-		if(lpIndex == 0 || lpIndex == -1){
-			SetError(300,NULL,cp);
-			return 0;
-		}
-
-		const CClass *pobj_c=(CClass *)lpIndex;
-
-		return pobj_c->GetSize();
-	}
-
-	else if(type==DEF_OBJECT){
-		return PTR_SIZE;
-	}
-	else{
-		SetError(300,NULL,cp);
-	}
-	return 0;
-}
 int GetPtrType(int type){
 	return MAKE_PTR_TYPE(NATURAL_TYPE(type),PTR_LEVEL(type)+1);
@@ -475,5 +423,8 @@
 
 
-bool GetMemberType( const CClass &objClass, const char *lpszMember, Type &resultType, BOOL bPrivateAccess, bool isErrorEnabled){
+bool GetMemberType( const Type &classType, const char *lpszMember, Type &resultType, BOOL bPrivateAccess, bool isErrorEnabled)
+{
+	const CClass &objClass = classType.GetClass();
+
 	extern int cp;
 
@@ -522,4 +473,27 @@
 	resultType = pMember->GetType();
 
+
+	/////////////////////////////////////////////////////////
+	// ☆★☆ ジェネリクスサポート ☆★☆
+
+	if( resultType.IsTypeParameter() )
+	{
+		// 型パラメータだったとき
+		if( classType.HasActualGenericType() )
+		{
+			// TODO: GetDummyActualGenericTypeを適切な形に実装し直す
+			resultType = classType.GetDummyActualGenericType();
+		}
+		else
+		{
+			// TODO: ベースオブジェクト（指定されていないときはObjectクラス）にセットする
+			resultType.SetBasicType( DEF_OBJECT );
+		}
+	}
+
+	//
+	/////////////////////////////////////////////////////////
+
+
 	//ポインタ変数の場合
 	if( resultType.IsPointer() ){
@@ -539,5 +513,5 @@
 		//入れ子構造の場合
 
-		return GetMemberType( pMember->GetType().GetClass(),
+		return GetMemberType( pMember->GetType(),
 			NestMember,
 			resultType,
@@ -633,5 +607,11 @@
 		}
 
-		return GetMemberType(*compiler.pCompilingClass,variable,resultType,1,isErrorEnabled);
+		return GetMemberType(
+			Type( DEF_OBJECT, *compiler.pCompilingClass ),
+			variable,
+			resultType,
+			1,
+			isErrorEnabled
+		);
 	}
 
@@ -729,6 +709,7 @@
 	if(member[0]){
 		if( NATURAL_TYPE( resultType.GetBasicType() )==DEF_OBJECT
-			|| NATURAL_TYPE( resultType.GetBasicType() )==DEF_STRUCT){
-				return GetMemberType(resultType.GetClass(),member,resultType,0,isErrorEnabled);
+			|| NATURAL_TYPE( resultType.GetBasicType() )==DEF_STRUCT)
+		{
+			return GetMemberType(resultType,member,resultType,0,isErrorEnabled);
 		}
 	}
@@ -753,5 +734,6 @@
 }
 
-bool GetVarOffsetReadOnly(const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts ){
+bool GetVarOffsetReadOnly(const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts )
+{
 	//読み取り専用で変数へアクセス
 	return GetVarOffset(
@@ -764,5 +746,6 @@
 	);
 }
-bool GetVarOffsetReadWrite(const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts ){
+bool GetVarOffsetReadWrite(const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts )
+{
 	//読み書き両用で変数へアクセス
 	return GetVarOffset(
