code: protected boolean isMemberOnEnhancementOfEnclosingType( AbstractDynamicSymbol symbol )
    {
      if (!_cc().isNonStaticInnerClass()) {
        return false;
      }
  
      IType enhancement = symbol.getGosuClass();
      if (! ( enhancement instanceof IGosuEnhancement ) ) {
        return false;
      }
      IType enhancedType = ((IGosuEnhancement) enhancement).getEnhancedType();
  
      // If the symbol is on this class, or any ancestors, it's not enclosed
      //noinspection SuspiciousMethodCalls
      if (getGosuClass().getAllTypesInHierarchy().contains( enhancedType )) {
        return false;
      }
  
      ICompilableTypeInternal enclosingClass = _cc().getEnclosingType();
      while( enclosingClass != null )
      {
        //noinspection SuspiciousMethodCalls
        if( enclosingClass.getAllTypesInHierarchy().contains( enhancedType ) )
        {
          return true;
        }
        enclosingClass = enclosingClass.getEnclosingType();
      }
  
      return false;
    }
docs: class OR is defined on a supertype or interface of an enclosing class