Index: trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 701)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 702)
@@ -106,5 +106,5 @@
 }
 
-bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, const Type &baseType, Type &resultType, bool isCallOn )
+bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, const Type &baseType, Type &resultType, bool isCallOn, int dwCallProcFlags )
 {
 	//GetSubHash内でエラー提示が行われた場合
@@ -144,5 +144,5 @@
 
 		if( isCallOn ){
-			if( !Opcode_CallProc(lpszParms,pUserProc,0,ObjectName ) ){
+			if( !Opcode_CallProc(lpszParms,pUserProc,dwCallProcFlags,ObjectName ) ){
 				return false;
 			}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/common.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/common.h	(revision 701)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/common.h	(revision 702)
@@ -349,5 +349,5 @@
 int GetProc(char *name,void **ppInfo);
 void SplitObjectName(const char *name,char *ObjectName, ReferenceKind &referenceFind );
-bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, const Type &baseType, Type &resultType, bool isCallOn = true );
+bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, const Type &baseType, Type &resultType, bool isCallOn = true, int dwCallProcFlags = 0 );
 bool CallPropertyMethod( const char *variable, const char *rightSide, Type &resultType);
 bool GetReturnTypeOfPropertyMethod( const char *variable, const char *rightSide, Type &resultType );
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp	(revision 701)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp	(revision 702)
@@ -251,4 +251,6 @@
 	if(errorCode==143) sprintf(msg,"\"%s\" ジェネリクス型に型パラメータが指定されていません。",tempKeyWord);
 	if(errorCode==144) sprintf(msg,"Thisの変数ポインタを取得することはできません。",tempKeyWord);
+	if(errorCode==145) sprintf(msg,"コンストラクタを直接呼び出すことはできません。。",tempKeyWord);
+	if(errorCode==146) sprintf(msg,"デストラクタを直接呼び出すことはできません。。",tempKeyWord);
 
 	//Enum関連
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h	(revision 701)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h	(revision 702)
@@ -304,4 +304,8 @@
 		return isCompiled;
 	}
+	bool IsConstructor() const
+	{
+		return ( this->HasParentClass() && this->GetName() == this->GetParentClass().GetName() );
+	}
 	bool IsDestructor() const
 	{
Index: trunk/ab5.0/abdev/compiler_x86/Compile_CallProc.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_CallProc.cpp	(revision 701)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_CallProc.cpp	(revision 702)
@@ -97,4 +97,16 @@
 			return true;
 		}
+	}
+	if( (dwFlags&PROCFLAG_PERMIT_CONSTRUCTOR) == 0 && pUserProc->IsConstructor() )
+	{
+		// コンストラクタの直接呼出しはエラーとする
+		compiler.errorMessenger.Output(145,NULL,cp);
+		return false;
+	}
+	if( (dwFlags&PROCFLAG_PERMIT_DESTRUCTOR) == 0 && pUserProc->IsDestructor() )
+	{
+		// デストラクタの直接呼出しはエラーとする
+		compiler.errorMessenger.Output(146,NULL,cp);
+		return false;
 	}
 
Index: trunk/ab5.0/abdev/compiler_x86/Compile_Object.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_Object.cpp	(revision 701)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_Object.cpp	(revision 702)
@@ -74,5 +74,5 @@
 	Opcode_CallProc(CreateParameter,
 		pUserProc,
-		PROCFLAG_NEW,"");
+		PROCFLAG_NEW | PROCFLAG_PERMIT_CONSTRUCTOR,"");
 
 
Index: trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 701)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 702)
@@ -469,15 +469,6 @@
 			compiler.GetCompilingClass().NotifyStartConstructorCompile();
 
-			//基底クラスかどうかの識別
-			//（継承元がインターフェイスの場合も基底クラスと見なす）
-			BOOL bThisIsSuperClass;
-			if( !compiler.GetCompilingClass().HasSuperClass() ) bThisIsSuperClass=1;
-			else if( compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod() == NULL ){
-				//インターフェイスを継承したときはコンストラクタを持たない
-				bThisIsSuperClass=1;
-			}
-			else bThisIsSuperClass=0;
-
-			if(!bThisIsSuperClass){
+			if( compiler.GetCompilingClass().HasSuperClass() )
+			{
 				/* サブクラスコンストラクタをコンパイルしているときは、
 					基底クラスのコンストラクタを呼び出す */
@@ -507,20 +498,49 @@
 					RemoveStringPare(temporary);
 
-					Type dummyType;
-					CallProc( PROC_DEFAULT
-						, &compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod()->GetUserProc()
-						, compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod()->GetUserProc().GetName().c_str()
-						, temporary
-						, Type()		// baseTypeはなし
-						, dummyType
-					);
+
+					////////////////////////
+					// オーバーロードを解決
+					////////////////////////
+
+					std::vector<const UserProc *> subs;
+					compiler.GetCompilingClass().GetSuperClass().GetDynamicMethods().Enum( compiler.GetCompilingClass().GetSuperClass().GetName().c_str(), subs );
+
+					const UserProc *pUserProc = NULL;
+					if( subs.size() > 0 )
+					{
+						//オーバーロードを解決
+						pUserProc=OverloadSolutionWithStrParam(  compiler.GetCompilingClass().GetSuperClass().GetName().c_str(),
+							subs,temporary,"");
+					}
+					if( !pUserProc )
+					{
+						compiler.errorMessenger.Output(1,NULL,cp);
+					}
+					else
+					{
+						Type dummyType;
+						CallProc( PROC_DEFAULT
+							, pUserProc
+							, pUserProc->GetName().c_str()
+							, temporary
+							, Type()		// baseTypeはなし
+							, dummyType
+							, true
+							, PROCFLAG_PERMIT_CONSTRUCTOR
+						);
+					}
 				}
 				else{
-					//基底クラスのコンストラクタを暗黙的に呼び出す
-					Opcode_CallProc("",
-						&compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod()->GetUserProc(),
-						0,
-						""
-					);
+					if( compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod() != NULL )
+					{
+						// 基底クラスがデフォルトコンストラクタを保有するとき
+
+						// 基底クラスのコンストラクタを暗黙的に呼び出す
+						Opcode_CallProc("",
+							&compiler.GetCompilingClass().GetSuperClass().GetConstructorMethod()->GetUserProc(),
+							PROCFLAG_PERMIT_CONSTRUCTOR,
+							""
+						);
+					}
 				}
 			}
@@ -580,5 +600,5 @@
 					Opcode_CallProc("",
 						&method->GetUserProc(),
-						0,
+						PROCFLAG_PERMIT_DESTRUCTOR,
 						""
 					);
Index: trunk/ab5.0/abdev/compiler_x86/Opcode.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 701)
+++ trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 702)
@@ -213,5 +213,7 @@
 
 //Compile_CallProc.cpp
-#define PROCFLAG_NEW	1
+#define PROCFLAG_NEW				1
+#define PROCFLAG_PERMIT_CONSTRUCTOR	2
+#define PROCFLAG_PERMIT_DESTRUCTOR	4
 bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer);
 bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName );
