private void CheckThatMethodIsNotMarkedWithOverrideOrHide(FunctionObject func){
if (func.noVersionSafeAttributeSpecified) return;
//It is marked override or hide, give an appropriate error
if ((func.attributes & MethodAttributes.VtableLayoutMask) == MethodAttributes.ReuseSlot) // current method specifies override
func.funcContext.HandleError(JSError.NoMethodInBaseToOverride);
else // current method specifies hide
func.funcContext.HandleError(JSError.NoMethodInBaseToNew);
}