Replace assert with lazy assert, times with repeat.

This commit is contained in:
Ilya Gorbunov
2015-10-01 20:13:34 +03:00
parent c1ba30b4bc
commit 3106458cc4
50 changed files with 79 additions and 87 deletions
@@ -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')" }
}
}