Simplify and rename function type utilities

- isFunctionType -> change the only usage in TracingStrategyForInvoke to check
  for exact function type
- isExtensionFunctionType -> change all usages to check for exact extension
  function type because extension function types are uninheritable in Kotlin
- isExactFunctionType -> isNonExtensionFunctionType
- isExactExtensionFunctionType -> isExtensionFunctionType
- isExactFunctionOrExtensionFunctionType -> isFunctionType
- isFunctionOrExtensionFunctionType -> isFunctionTypeOrSubtype
This commit is contained in:
Alexander Udalov
2016-03-14 14:44:04 +03:00
parent e308f2acdb
commit c18fab82e5
32 changed files with 73 additions and 87 deletions
@@ -74,7 +74,7 @@ public class FunctionsHighlightingVisitor extends AfterAnalysisHighlightingVisit
DeclarationDescriptor container = calleeDescriptor.getContainingDeclaration();
boolean containedInFunctionClassOrSubclass =
container instanceof ClassDescriptor &&
FunctionTypesKt.isFunctionOrExtensionFunctionType(((ClassDescriptor) container).getDefaultType());
FunctionTypesKt.isFunctionTypeOrSubtype(((ClassDescriptor) container).getDefaultType());
NameHighlighter.highlightName(holder, callee, containedInFunctionClassOrSubclass
? KotlinHighlightingColors.VARIABLE_AS_FUNCTION_CALL
: KotlinHighlightingColors.VARIABLE_AS_FUNCTION_LIKE_CALL);