[Frontend] Make DiagnosticSuppressor a project-level extension
Originally it was an application-level component, which caused non-trivial
logic and cognitive load to carefully handle those extensions to avoid
memory leaks.
6740a596 introduced a way to easily register `DiagnosticSuppressor` to
project, and this commit continues this work, making it a proper
project-level extension
A lot of changes caused by the fact, that this extension is needed to be
obtained from `BindingContext` (see `BindingContextSuppressCache` and
its usages), so almost all changes are introducing `Project` to
`BindingContext`
^KT-66449 Fixed
This commit is contained in:
committed by
Space Team
parent
a552238874
commit
d352cc9d96
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.resolve.BindingTraceContext;
|
||||
public class TrackingSliceMapTest extends TestCase {
|
||||
public void testSimpleSlice() {
|
||||
WritableSlice<String, Integer> SUPER_COMPUTER = Slices.<String, Integer>sliceBuilder().setDebugName("SUPER_COMPUTER").build();
|
||||
BindingTraceContext traceContext = BindingTraceContext.createTraceableBindingTrace();
|
||||
BindingTraceContext traceContext = BindingTraceContext.createTraceableBindingTrace(null);
|
||||
|
||||
traceContext.record(SUPER_COMPUTER, "Answer", 42);
|
||||
Integer answer = traceContext.get(SUPER_COMPUTER, "Answer");
|
||||
@@ -39,7 +39,7 @@ public class TrackingSliceMapTest extends TestCase {
|
||||
.setFurtherLookupSlices(new ReadOnlySlice[] {NAME_COLOR})
|
||||
.setDebugName("NAME_OBJECT").build();
|
||||
|
||||
BindingTraceContext traceContext = BindingTraceContext.createTraceableBindingTrace();
|
||||
BindingTraceContext traceContext = BindingTraceContext.createTraceableBindingTrace(null);
|
||||
|
||||
traceContext.record(NAME_COLOR, "RED", 0xff0000);
|
||||
Object object = traceContext.get(NAME_OBJECT, "RED");
|
||||
|
||||
Reference in New Issue
Block a user