Kotlin: Speed up the toString consistency query

Using Top.getAQlClass() means we have to evaluate
SummarizedCallableExternal's charpred, and hence summaryElement,
which is slow.
This commit is contained in:
Ian Lynagh
2021-11-04 17:35:56 +00:00
parent 9a621479cc
commit 59307285e8

View File

@@ -20,7 +20,7 @@ string topToString(Top t) {
}
string not1ToString() {
exists(Top t | count(topToString(t)) != 1 and result = "Top which doesn't have exactly 1 toString: " + concat(t.getAQlClass(), ", "))
exists(Top t | count(topToString(t)) != 1 and result = "Top which doesn't have exactly 1 toString: " + t.getPrimaryQlClasses())
or
exists(Location l | count(l.toString()) != 1 and result = "Location which doesn't have exactly 1 toString: " + concat(l.getAQlClass(), ", "))
or