@NotNull
  @Override
  public JetTypeParameter getOrigin() {
    JetTypeParameterListOwner jetOwner =
        (JetTypeParameterListOwner) LightClassUtilsKt.getUnwrapped(owner);
    assert (jetOwner != null) : "Invalid type parameter owner: " + owner;

    return jetOwner.getTypeParameters().get(index);
  }
Example #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);
    }
  }