Beispiel #1
0
 private void resolveDelegationSpecifierLists() {
   // TODO : Make sure the same thing is not initialized twice
   for (Map.Entry<JetClass, MutableClassDescriptor> entry : context.getClasses().entrySet()) {
     resolveDelegationSpecifierList(entry.getKey(), entry.getValue());
   }
   for (Map.Entry<JetObjectDeclaration, MutableClassDescriptor> entry :
       context.getObjects().entrySet()) {
     resolveDelegationSpecifierList(entry.getKey(), entry.getValue());
   }
 }
  private static void delegationSpecifierAdditionalResolve(
      final ResolveSession resolveSession,
      final JetDelegationSpecifierList specifier,
      DelegatingBindingTrace trace,
      JetFile file) {
    BodyResolver bodyResolver =
        createBodyResolverWithEmptyContext(trace, file, resolveSession.getModuleConfiguration());

    JetClassOrObject classOrObject = (JetClassOrObject) specifier.getParent();
    LazyClassDescriptor descriptor =
        (LazyClassDescriptor) resolveSession.resolveToDescriptor(classOrObject);

    // Activate resolving of supertypes
    descriptor.getTypeConstructor().getSupertypes();

    bodyResolver.resolveDelegationSpecifierList(
        classOrObject,
        descriptor,
        descriptor.getUnsubstitutedPrimaryConstructor(),
        descriptor.getScopeForClassHeaderResolution(),
        descriptor.getScopeForMemberDeclarationResolution());
  }