Index: BasicCompiler64/Compile_CallProc.cpp
===================================================================
--- BasicCompiler64/Compile_CallProc.cpp	(revision 17)
+++ BasicCompiler64/Compile_CallProc.cpp	(revision 18)
@@ -233,5 +233,6 @@
 
 	BOOL bStatic=0;
-	CClass *pobj_c;
+	CClass *pobj_c = NULL;
+	CMethod *pMethod = NULL;
 	if(psi->pobj_ParentClass){
 		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
@@ -264,17 +265,17 @@
 		}
 
-		DWORD dwAccess;
-		for(i=0;i<pobj_c->iMethodNum;i++){
-			if(psi==pobj_c->ppobj_Method[i]->psi) break;
-		}
-		if(i==pobj_c->iMethodNum){
-			for(i=0;i<pobj_c->iStaticMethodNum;i++){
-				if(psi==pobj_c->ppobj_StaticMethod[i]->psi) break;
-			}
-			dwAccess=pobj_c->ppobj_StaticMethod[i]->dwAccess;
-
-			bStatic=1;
-		}
-		else dwAccess=pobj_c->ppobj_Method[i]->dwAccess;
+
+		/////////////////////////////////
+		// メソッド情報を取得
+		/////////////////////////////////
+		pMethod = pobj_c->GetMethodInfo( psi );
+		if( !pMethod ){
+			//動的メソッドが取得できなかったときは静的メソッドを当たる
+			pMethod = pobj_c->GetStaticMethodInfo( psi );
+			if( !pMethod ){
+				SetError(300,NULL,cp);
+				return -1;
+			}
+		}
 
 
@@ -282,4 +283,5 @@
 		// アクセスエラーチェック
 		//////////////////////////////
+		DWORD dwAccess = pMethod->dwAccess;
 
 		if(ObjectName[0]){
@@ -408,5 +410,13 @@
 			else{
 				RELATIVE_VAR RelativeVar;
-				if(!GetVarOffsetReadOnly(ObjectName,&i2,&RelativeVar,0)) return -1;
+				if( pMethod->isConst ){
+					//Constアクセスが可能なメソッドの場合
+					if( !GetVarOffsetReadOnly( ObjectName, &i2, &RelativeVar, 0 ) ) return -1;
+				}
+				else{
+					//Constアクセスが不可能なメソッドの場合
+					if( !GetVarOffsetReadWrite( ObjectName, &i2, &RelativeVar, 0 ) ) return -1;
+				}
+
 				SetVarPtrToReg(REG_RCX,&RelativeVar);
 
Index: BasicCompiler64/Compile_ProcOp.cpp
===================================================================
--- BasicCompiler64/Compile_ProcOp.cpp	(revision 17)
+++ BasicCompiler64/Compile_ProcOp.cpp	(revision 18)
@@ -374,4 +374,7 @@
 	//コンパイル中の関数が属するクラス
 	pobj_CompilingClass=psi->pobj_ParentClass;
+	
+	//コンパイルスタートをクラス管理クラスに追加
+	pobj_DBClass->StartCompile( psi );
 
 	//コンパイル中の関数
@@ -614,4 +617,10 @@
 			}
 		}
+		if(psi->name[0]=='~'){
+			//デストラクタをコンパイルしたとき
+
+			//デストラクタのコンパイル開始を通知
+			pobj_CompilingClass->NotifyStartDestructorCompile();
+		}
 	}
 
@@ -633,6 +642,6 @@
 		if( pobj_CompilingClass->IsCompilingConstructor() ){
 			// コンストラクタをコンパイルしていたとき
+
 			// コンストラクタのコンパイルが完了したことを通知
-
 			pobj_CompilingClass->NotifyFinishConstructorCompile();
 		}
@@ -642,4 +651,7 @@
 			//デストラクタをコンパイルしたとき
 			////////////////////////////////////
+
+			// デストラクタのコンパイルが完了したことを通知
+			pobj_CompilingClass->NotifyFinishDestructorCompile();
 
 			if(pobj_CompilingClass->pobj_InheritsClass){
Index: BasicCompiler64/Compile_Var.cpp
===================================================================
--- BasicCompiler64/Compile_Var.cpp	(revision 17)
+++ BasicCompiler64/Compile_Var.cpp	(revision 18)
@@ -471,4 +471,15 @@
 			}
 			if(i==pobj_CompilingClass->iMemberNum) goto NonClassMember;
+		}
+
+		//Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
+		//（コンストラクタ、デストラクタ内を除く）
+		CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();
+		if( isWriteAccess &&
+			pMethod->isConst &&
+			pobj_CompilingClass->IsCompilingConstructor() == false &&
+			pobj_CompilingClass->IsCompilingDestructor() == false
+			){
+				SetError(131, NULL, cp );
 		}
 
@@ -590,7 +601,14 @@
 ok:
 
-	if(bConst && isWriteAccess){
+	if( bConst && isWriteAccess ){
 		//Const定義の変数に書き込みアクセスをしようとした場合
-		SetError(61,VarName,cp);
+		if( *pType == DEF_OBJECT ){
+			//オブジェクト定数
+			SetError(130, VarName, cp );
+		}
+		else{
+			//一般のConst変数
+			SetError(61,VarName,cp);
+		}
 	}
 
