[J2KT] Fix isDenotable() to exclude anonymous types.
@@ -117,7 +117,8 @@ public final class InsertCastsOnNullabilityMismatch extends NormalizationPass {
if (to instanceof DeclaredTypeDescriptor) {
DeclaredTypeDescriptor declaredTypeDescriptor = (DeclaredTypeDescriptor) to;
- return declaredTypeDescriptor.getTypeArgumentDescriptors().stream()
+ return !declaredTypeDescriptor.getTypeDeclaration().isAnonymous()
+ && declaredTypeDescriptor.getTypeArgumentDescriptors().stream()
.allMatch(it -> isDenotable(it, seenTypeVariables));
}
