Avoid calling descriptors.toString() in production code without need
This commit is contained in:
@@ -87,7 +87,7 @@ private fun <Function : FunctionHandle> findAllReachableDeclarations(function: F
|
|||||||
* The implementation is guaranteed to exist because if it wouldn't, the given function would've been abstract
|
* The implementation is guaranteed to exist because if it wouldn't, the given function would've been abstract
|
||||||
*/
|
*/
|
||||||
private fun <Function : FunctionHandle> findConcreteSuperDeclaration(function: Function): Function {
|
private fun <Function : FunctionHandle> findConcreteSuperDeclaration(function: Function): Function {
|
||||||
require(!function.isAbstract, "Only concrete functions have implementations: $function")
|
require(!function.isAbstract, { "Only concrete functions have implementations: $function" })
|
||||||
|
|
||||||
if (function.isDeclaration) return function
|
if (function.isDeclaration) return function
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ public class ForceResolveUtil {
|
|||||||
private ForceResolveUtil() {}
|
private ForceResolveUtil() {}
|
||||||
|
|
||||||
public static <T extends DeclarationDescriptor> T forceResolveAllContents(@NotNull T descriptor) {
|
public static <T extends DeclarationDescriptor> T forceResolveAllContents(@NotNull T descriptor) {
|
||||||
LOG.debug("descriptor: " + descriptor);
|
|
||||||
doForceResolveAllContents(descriptor);
|
doForceResolveAllContents(descriptor);
|
||||||
LOG.debug("<<< " + descriptor);
|
|
||||||
return descriptor;
|
return descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,9 +58,7 @@ public class ForceResolveUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void forceResolveAllContents(@NotNull TypeConstructor typeConstructor) {
|
public static void forceResolveAllContents(@NotNull TypeConstructor typeConstructor) {
|
||||||
LOG.debug("descriptor: " + typeConstructor);
|
|
||||||
doForceResolveAllContents(typeConstructor);
|
doForceResolveAllContents(typeConstructor);
|
||||||
LOG.debug("<<< " + typeConstructor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void forceResolveAllContents(@NotNull Annotations annotations) {
|
public static void forceResolveAllContents(@NotNull Annotations annotations) {
|
||||||
|
|||||||
Reference in New Issue
Block a user