Don't assert that annotation class has constructor in AnnotationDeserializer

#KT-9758 Fixed
This commit is contained in:
Alexander Udalov
2015-11-03 15:24:20 +03:00
parent 1a0c2e2cf6
commit 748c0e7149
8 changed files with 53 additions and 12 deletions
@@ -78,7 +78,7 @@ public final class DescriptorResolverUtils {
@Nullable
public static ValueParameterDescriptor getAnnotationParameterByName(@NotNull Name name, @NotNull ClassDescriptor annotationClass) {
Collection<ConstructorDescriptor> constructors = annotationClass.getConstructors();
assert constructors.size() == 1 : "Annotation class descriptor must have only one constructor";
if (constructors.size() != 1) return null;
for (ValueParameterDescriptor parameter : constructors.iterator().next().getValueParameters()) {
if (parameter.getName().equals(name)) {