diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt index 0acbbb59fe4..1115ea4d208 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt @@ -297,6 +297,9 @@ internal class NativeIndexImpl(val library: NativeLibrary) : NativeIndex() { val name = getCursorSpelling(declCursor) val underlying = convertType(clang_getTypedefDeclUnderlyingType(declCursor)) + + if (underlying == UnsupportedType) return underlying + if (clang_getCursorLexicalParent(declCursor).kind != CXCursorKind.CXCursor_TranslationUnit) { // Objective-C type parameters are represented as non-top-level typedefs. // Erase for now: