This commit is contained in:
		@@ -265,7 +265,7 @@ PH7_PRIVATE sxi32 PH7_ClassInherit(ph7_vm *pVm, ph7_class *pSub, ph7_class *pBas
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	SyHashResetLoopCursor(&pBase->hMethod);
 | 
						SyHashResetLoopCursor(&pBase->hMethod);
 | 
				
			||||||
	while((pEntry = SyHashGetNextEntry(&pBase->hMethod)) != 0) {
 | 
						while((pEntry = SyHashGetNextEntry(&pBase->hMethod)) != 0) {
 | 
				
			||||||
		/* Make sure the private/final methods are not redeclared in the subclass */
 | 
							/* Make sure the final methods are not redeclared in the subclass */
 | 
				
			||||||
		pMeth = (ph7_class_method *)pEntry->pUserData;
 | 
							pMeth = (ph7_class_method *)pEntry->pUserData;
 | 
				
			||||||
		pName = &pMeth->sFunc.sName;
 | 
							pName = &pMeth->sFunc.sName;
 | 
				
			||||||
		if((pEntry = SyHashGet(&pSub->hMethod, (const void *)pName->zString, pName->nByte)) != 0) {
 | 
							if((pEntry = SyHashGet(&pSub->hMethod, (const void *)pName->zString, pName->nByte)) != 0) {
 | 
				
			||||||
@@ -281,13 +281,11 @@ PH7_PRIVATE sxi32 PH7_ClassInherit(ph7_vm *pVm, ph7_class *pSub, ph7_class *pBas
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		/* Install the method */
 | 
							/* Install the method */
 | 
				
			||||||
		if(pMeth->iProtection != PH7_CLASS_PROT_PRIVATE) {
 | 
					 | 
				
			||||||
		rc = SyHashInsert(&pSub->hMethod, (const void *)pName->zString, pName->nByte, pMeth);
 | 
							rc = SyHashInsert(&pSub->hMethod, (const void *)pName->zString, pName->nByte, pMeth);
 | 
				
			||||||
		if(rc != SXRET_OK) {
 | 
							if(rc != SXRET_OK) {
 | 
				
			||||||
			return rc;
 | 
								return rc;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	/* Mark first inherited class as direct subclass */
 | 
						/* Mark first inherited class as direct subclass */
 | 
				
			||||||
	if(!pSub->pBase) {
 | 
						if(!pSub->pBase) {
 | 
				
			||||||
		pSub->pBase = pBase;
 | 
							pSub->pBase = pBase;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user