Replace assert with lazy assert, times with repeat.
This commit is contained in:
@@ -51,8 +51,7 @@ class PartialBodyResolveFilter(
|
||||
|
||||
init {
|
||||
assert(declaration.isAncestor(elementToResolve))
|
||||
assert(!JetPsiUtil.isLocal(declaration),
|
||||
"Should never be invoked on local declaration otherwise we may miss some local declarations with type Nothing")
|
||||
assert(!JetPsiUtil.isLocal(declaration)) { "Should never be invoked on local declaration otherwise we may miss some local declarations with type Nothing" }
|
||||
|
||||
declaration.forEachDescendantOfType<JetCallableDeclaration> { declaration ->
|
||||
if (declaration.getTypeReference().containsProbablyNothing()) {
|
||||
@@ -445,7 +444,7 @@ class PartialBodyResolveFilter(
|
||||
) {
|
||||
init {
|
||||
if (selectorName == null) {
|
||||
assert(receiverName == null, "selectorName is allowed to be null only when receiverName is also null (which means 'this')")
|
||||
assert(receiverName == null) { "selectorName is allowed to be null only when receiverName is also null (which means 'this')" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user