Skip to content

Commit

Permalink
Comment logging of inferred types
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Dec 28, 2024
1 parent 4e2e161 commit a53ad56
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,14 @@ class TypeInferenceManager(
}
}.toMap()
}
logger.info {
buildString {
appendLine("Return types:")
for ((method, type) in inferredReturnTypes) {
appendLine("Return type for ${method.signature.enclosingClass.file}::${method.signature.enclosingClass.name}::${method.name}: ${type.toPrettyString()}")
}
}
}
// logger.info {
// buildString {
// appendLine("Return types:")
// for ((method, type) in inferredReturnTypes) {
// appendLine("Return type for ${method.signature.enclosingClass.file}::${method.signature.enclosingClass.name}::${method.name}: ${type.toPrettyString()}")

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
// }
// }
// }

val inferredLocalTypes: Map<EtsMethod, Map<AccessPathBase, EtsTypeFact>>? = if (doInferAllLocals) {
forwardSummaries.asSequence().map { (method, summaries) ->
Expand Down Expand Up @@ -411,17 +411,17 @@ class TypeInferenceManager(
}

if (inferredLocalTypes != null) {
logger.info {
buildString {
appendLine("Local types:")
for ((method, localTypes) in inferredLocalTypes) {
appendLine("Local types for ${method.signature.enclosingClass.name}::${method.name} in ${method.signature.enclosingClass.file}:")
for ((base, fact) in localTypes.entries.sortedBy { (it.key as AccessPathBase.Local).name }) {
appendLine("$base: ${fact.toPrettyString()}")
}
}
}
}
// logger.info {
// buildString {
// appendLine("Local types:")
// for ((method, localTypes) in inferredLocalTypes) {
// appendLine("Local types for ${method.signature.enclosingClass.name}::${method.name} in ${method.signature.enclosingClass.file}:")

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
// for ((base, fact) in localTypes.entries.sortedBy { (it.key as AccessPathBase.Local).name }) {
// appendLine("$base: ${fact.toPrettyString()}")
// }
// }
// }
// }

for ((method, localFacts) in inferredLocalTypes) {
val facts = refinedTypes[method]
Expand Down

0 comments on commit a53ad56

Please sign in to comment.