Renames - dropped word "Service"
This commit is contained in:
@@ -70,8 +70,8 @@ public abstract class ElementResolver {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ProbablyNothingCallableNamesService probablyNothingCallableNamesService() {
|
||||
return DefaultNothingCallableNamesService.INSTANCE$;
|
||||
protected ProbablyNothingCallableNames probablyNothingCallableNames() {
|
||||
return DefaultNothingCallableNames.INSTANCE$;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -101,7 +101,7 @@ public abstract class ElementResolver {
|
||||
boolean inBody = body != null && PsiTreeUtil.isAncestor(body, jetElement, false);
|
||||
Function1<JetElement, Boolean> filter;
|
||||
if (inBody) {
|
||||
filter = new PartialBodyResolveFilter(jetElement, body, probablyNothingCallableNamesService());
|
||||
filter = new PartialBodyResolveFilter(jetElement, body, probablyNothingCallableNames());
|
||||
}
|
||||
else { // do as less as possible body-resolve
|
||||
filter = new Function1<JetElement, Boolean>() {
|
||||
|
||||
@@ -34,13 +34,13 @@ import org.jetbrains.jet.utils.addToStdlib.firstOrNullIsInstance
|
||||
class PartialBodyResolveFilter(
|
||||
elementToResolve: JetElement,
|
||||
private val body: JetExpression,
|
||||
probablyNothingCallableNamesService: ProbablyNothingCallableNamesService
|
||||
probablyNothingCallableNames: ProbablyNothingCallableNames
|
||||
) : (JetElement) -> Boolean {
|
||||
|
||||
private val statementTree = StatementTree()
|
||||
|
||||
private val nothingFunctionNames = HashSet(probablyNothingCallableNamesService.functionNames())
|
||||
private val nothingPropertyNames = probablyNothingCallableNamesService.propertyNames()
|
||||
private val nothingFunctionNames = HashSet(probablyNothingCallableNames.functionNames())
|
||||
private val nothingPropertyNames = probablyNothingCallableNames.propertyNames()
|
||||
|
||||
;{
|
||||
assert(body.isAncestor(elementToResolve, strict = false))
|
||||
|
||||
+2
-2
@@ -16,12 +16,12 @@
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.lazy
|
||||
|
||||
public trait ProbablyNothingCallableNamesService {
|
||||
public trait ProbablyNothingCallableNames {
|
||||
public fun functionNames(): Set<String>
|
||||
public fun propertyNames(): Set<String>
|
||||
}
|
||||
|
||||
public object DefaultNothingCallableNamesService : ProbablyNothingCallableNamesService {
|
||||
public object DefaultNothingCallableNames : ProbablyNothingCallableNames {
|
||||
private val hardcodedNames = setOf("error")
|
||||
|
||||
override fun functionNames() = hardcodedNames
|
||||
Reference in New Issue
Block a user