Class literal access supported
This commit is contained in:
+7
@@ -327,6 +327,13 @@ private class Processor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is KtClassLiteralExpression -> {
|
||||
if (element == parent.receiverExpression) { // ClassName::class
|
||||
processSuspiciousExpression(element)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (element.getStrictParentOfType<KtImportDirective>() != null) return true // ignore usage in import
|
||||
|
||||
+2
@@ -21,4 +21,6 @@ fun foo(x: X) {
|
||||
|
||||
val constructor = ::A
|
||||
val (a3, b3) = constructor(1, 2)
|
||||
|
||||
val (a4, b4) = A::class.java.newInstance()
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
Checked type of (a1, b1)
|
||||
Checked type of (a2, b2)
|
||||
Checked type of (a3, b3)
|
||||
Checked type of (a4, b4)
|
||||
Checked type of X.f2()
|
||||
Checked type of constructor
|
||||
Checked type of fun2
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
Value read 19 val (a1, b1) = fun2()
|
||||
Value read 20 val (a2, b2) = fun3()
|
||||
Value read 23 val (a3, b3) = constructor(1, 2)
|
||||
Value read 25 val (a4, b4) = A::class.java.newInstance()
|
||||
Reference in New Issue
Block a user