mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
Kotlin SAM conversion: tolerate property refs used to implement a SAM interface
This commit is contained in:
@@ -5036,7 +5036,10 @@ open class KotlinFileExtractor(
|
||||
return
|
||||
}
|
||||
|
||||
if (!st.isFunctionOrKFunction() && !st.isSuspendFunctionOrKFunction()) {
|
||||
fun IrSimpleType.isKProperty() =
|
||||
classFqName?.asString()?.startsWith("kotlin.reflect.KProperty") == true
|
||||
|
||||
if (!st.isFunctionOrKFunction() && !st.isSuspendFunctionOrKFunction() && !st.isKProperty()) {
|
||||
logger.errorElement("Expected to find expression with function type in SAM conversion.", e)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user