Binding trace filtering: do not calculate diagnostics if no one is going to query them

This commit is contained in:
Dmitry Jemerov
2016-09-26 12:48:46 +02:00
parent b365e547c4
commit d8b0c7aaec
24 changed files with 230 additions and 89 deletions
@@ -196,6 +196,11 @@ public class KotlinTestUtils {
throw new IllegalStateException("Unresolved: " + diagnostic.getPsiElement().getText());
}
}
@Override
public boolean wantsDiagnostics() {
return false;
}
};
public static BindingTrace DUMMY_EXCEPTION_ON_ERROR_TRACE = new BindingTrace() {
@@ -276,6 +281,11 @@ public class KotlinTestUtils {
throw new IllegalStateException(DefaultErrorMessages.render(diagnostic));
}
}
@Override
public boolean wantsDiagnostics() {
return true;
}
};
// We suspect sequences of eight consecutive hexadecimal digits to be a package part hash code