mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Merge pull request #10821 from smowton/smowton/fix/kotlin-property-ref-to-sam-interface
Kotlin SAM conversion: tolerate property refs used to implement a SAM interface
This commit is contained in:
@@ -5045,7 +5045,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