code: private void complete(Symbol sym) throws CompletionFailure {
          if (sym.kind == TYP) {
              try {
                  ClassSymbol c = (ClassSymbol) sym;
                  dependencies.push(c, CompletionCause.CLASS_READER);
                  annotate.blockAnnotations();
                  c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
                  completeOwners(c.owner);
                  completeEnclosing(c);
                  fillIn(c);
              } finally {
                  annotate.unblockAnnotationsNoFlush();
                  dependencies.pop();
              }
          } else if (sym.kind == PCK) {
              PackageSymbol p = (PackageSymbol)sym;
              try {
                  fillIn(p);
              } catch (IOException ex) {
                  throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex);
              }
          }
          if (!reader.filling)
              annotate.flush(); // finish attaching annotations
      }
docs: Completion for classes to be loaded. Before a class is loaded
  we make sure its enclosing class (if any) is loaded.