PlatformExtensionReceiverOfInline: fix false positive with extension function with nullable type receiver
#KT-37256 Fixed
This commit is contained in:
committed by
Yan Zhulanow
parent
6868f53f46
commit
ded996bdf7
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class JavaFoo {
|
||||
public static String foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
inline fun String?.contentToByte(): Byte {
|
||||
return 0
|
||||
}
|
||||
|
||||
fun main() {
|
||||
JavaFoo.foo().toBoolean()
|
||||
JavaFoo.foo().contentToByte()
|
||||
}
|
||||
Vendored
+2
@@ -13,6 +13,8 @@ fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
inline fun String.toBoolean(): Boolean = true
|
||||
|
||||
fun String.contentNotInline() {}
|
||||
|
||||
class My {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"inspectionClass": "org.jetbrains.kotlin.idea.inspections.PlatformExtensionReceiverOfInlineInspection",
|
||||
"withRuntime": "true",
|
||||
"isMultiModule": "false"
|
||||
"isMultiModule": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user