diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 14017a8b6c8..708600f6b22 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -1365,7 +1365,8 @@ open class KotlinFileExtractor( extractTypeAccessRecursive(substitutedType, location, id, -1) } val syntheticParameterNames = - vp.origin == IrDeclarationOrigin.UNDERSCORE_PARAMETER || + (vp.origin == IrDeclarationOrigin.UNDERSCORE_PARAMETER && + vp.name.asString() != "_") || ((vp.parent as? IrFunction)?.let { hasSynthesizedParameterNames(it) } ?: true) val javaParameter = when (val callable = (vp.parent as? IrFunction)?.let { getJavaCallable(it) }) { diff --git a/java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected b/java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected index ba0fd4346e4..7f53cabf845 100644 --- a/java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected +++ b/java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected @@ -1 +1 @@ -| test.kt:5:9:5:9 | p0 | p0 | +| test.kt:5:9:5:9 | _ | _ |