Пример #1
0
  private void processModifiersOnInitializer(
      @NotNull JetModifierListOwner owner, @NotNull LexicalScope scope) {
    annotationChecker.check(owner, trace, null);
    ModifierCheckerCore.INSTANCE$.check(owner, trace, null);
    JetModifierList modifierList = owner.getModifierList();
    if (modifierList == null) return;

    annotationResolver.resolveAnnotationsWithArguments(scope, modifierList, trace);
  }
Пример #2
0
  private void checkTypeParameters(JetTypeParameterListOwner typeParameterListOwner) {
    // TODO: Support annotation for type parameters
    for (JetTypeParameter jetTypeParameter : typeParameterListOwner.getTypeParameters()) {
      AnnotationResolver.reportUnsupportedAnnotationForTypeParameter(jetTypeParameter, trace);

      TypeParameterDescriptor typeParameter = trace.get(TYPE_PARAMETER, jetTypeParameter);
      if (typeParameter != null) {
        DescriptorResolver.checkConflictingUpperBounds(trace, typeParameter, jetTypeParameter);
      }
      AnnotationTargetChecker.INSTANCE$.check(jetTypeParameter, trace);
    }
  }