Fix NPE in suspension point in monitor call checker
#KT-27484 Fixed
This commit is contained in:
+2
-1
@@ -42,7 +42,8 @@ class SuspensionPointInSynchronizedCallChecker : CallChecker {
|
||||
if (parent !is KtValueArgumentList) {
|
||||
child = parent
|
||||
}
|
||||
parent = parent.parent
|
||||
// parent.parent can be null if we edit the file, see EA-2158254 and KT-27484
|
||||
parent = parent.parent ?: return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
inline val C.v: Int get() = 1
|
||||
class C {
|
||||
fun f(block: suspend C.() -> Unit): Unit = TODO()
|
||||
}
|
||||
suspend fun yield() = {}
|
||||
fun f(c: C) {
|
||||
c.f {
|
||||
v.toString()
|
||||
yie<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: yield
|
||||
+5
@@ -359,6 +359,11 @@ public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJ
|
||||
runTest("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassNameConflict/");
|
||||
}
|
||||
|
||||
@TestMetadata("SuspensionPointInMonitor")
|
||||
public void testSuspensionPointInMonitor() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/multifile/SuspensionPointInMonitor/");
|
||||
}
|
||||
|
||||
@TestMetadata("SyntheticExtensionDeprecated")
|
||||
public void testSyntheticExtensionDeprecated() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/multifile/SyntheticExtensionDeprecated/");
|
||||
|
||||
Reference in New Issue
Block a user