From c4d015626a46632b53092d502b726a6b24500e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 19 Jun 2025 20:50:12 +0200 Subject: [PATCH] Handle `@captureSuggestions` in the harness --- internal/testutil/harnessutil/harnessutil.go | 3 + .../submodule/compiler/overshifts.errors.txt | 110 ++++++++++- .../compiler/overshifts.errors.txt.diff | 177 ------------------ 3 files changed, 112 insertions(+), 178 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index acce099b89..9c2c324ef7 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -581,6 +581,9 @@ func compileFilesWithHost( if config.CompilerOptions().GetEmitDeclarations() { diagnostics = append(diagnostics, program.GetDeclarationDiagnostics(ctx, nil)...) } + if harnessOptions.CaptureSuggestions { + diagnostics = append(diagnostics, program.GetSuggestionDiagnostics(ctx, nil)...) + } emitResult := program.Emit(compiler.EmitOptions{}) return newCompilationResult(config.CompilerOptions(), program, emitResult, diagnostics, harnessOptions) diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt index d7daa2f563..dde392d2fd 100644 --- a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt @@ -1,3 +1,39 @@ +overshifts.ts(2,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(3,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. +overshifts.ts(4,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(6,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(7,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. +overshifts.ts(8,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(11,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(12,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. +overshifts.ts(13,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(15,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(16,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. +overshifts.ts(17,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(20,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(21,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. +overshifts.ts(22,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(24,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(25,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. +overshifts.ts(26,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(30,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(31,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. +overshifts.ts(32,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(34,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(35,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. +overshifts.ts(36,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(39,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(40,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. +overshifts.ts(41,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(43,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(44,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. +overshifts.ts(45,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(48,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(49,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. +overshifts.ts(50,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(52,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(53,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. +overshifts.ts(54,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. @@ -18,61 +54,133 @@ overshifts.ts(85,9): error TS6807: This operation can be simplified. This shift overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -==== overshifts.ts (18 errors) ==== +==== overshifts.ts (54 errors) ==== 1 << 1; // ok 1 << 32; // overshift + ~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. 1 << 123; + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. 1 << 1024; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. 1 << -1; // OK-ish 1 << -32; // backwards overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. 1 << -123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. 1 << -1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. 0xFF_FF_FF_FF >> 1; // ok 0xFF_FF_FF_FF >> 32; // overshift + ~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. 0xFF_FF_FF_FF >> 123; + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. 0xFF_FF_FF_FF >> 1024; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. 0xFF_FF_FF_FF >> -1; // OK-ish 0xFF_FF_FF_FF >> -32; // backwards overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. 0xFF_FF_FF_FF >> -123; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. 0xFF_FF_FF_FF >> -1024; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. 0xFF_FF_FF_FF >>> 1; // ok 0xFF_FF_FF_FF >>> 32; // overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. 0xFF_FF_FF_FF >>> 123; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. 0xFF_FF_FF_FF >>> 1024; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. 0xFF_FF_FF_FF >>> -1; // OK-ish 0xFF_FF_FF_FF >>> -32; // backwards overshift + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. 0xFF_FF_FF_FF >>> -123; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. 0xFF_FF_FF_FF >>> -1024; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. let x = 1; x <<= 1; // ok x <<= 32; // overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. x <<= 123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. x <<= 1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. x <<= -1; // OK-ish x <<= -32; // backwards overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. x <<= -123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. x <<= -1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. x >>= 1; // ok x >>= 32; // overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. x >>= 123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. x >>= 1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. x >>= -1; // OK-ish x >>= -32; // backwards overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. x >>= -123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. x >>= -1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. x >>>= 1; // ok x >>>= 32; // overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. x >>>= 123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. x >>>= 1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. x >>>= -1; // OK-ish x >>>= -32; // backwards overshift + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. x >>>= -123; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. x >>>= -1024; + ~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. enum One { A = 1 << 1, // ok diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff deleted file mode 100644 index a0019f43a1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff +++ /dev/null @@ -1,177 +0,0 @@ ---- old.overshifts.errors.txt -+++ new.overshifts.errors.txt -@@= skipped -0, +0 lines =@@ --overshifts.ts(2,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(3,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. --overshifts.ts(4,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(6,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(7,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. --overshifts.ts(8,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(11,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(12,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. --overshifts.ts(13,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(15,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(16,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. --overshifts.ts(17,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(20,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(21,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. --overshifts.ts(22,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(24,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(25,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. --overshifts.ts(26,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(30,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. --overshifts.ts(31,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. --overshifts.ts(32,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. --overshifts.ts(34,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. --overshifts.ts(35,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. --overshifts.ts(36,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. --overshifts.ts(39,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. --overshifts.ts(40,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. --overshifts.ts(41,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. --overshifts.ts(43,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. --overshifts.ts(44,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. --overshifts.ts(45,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. --overshifts.ts(48,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. --overshifts.ts(49,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. --overshifts.ts(50,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. --overshifts.ts(52,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. --overshifts.ts(53,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. --overshifts.ts(54,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. - overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. - overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. - overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -@@= skipped -53, +17 lines =@@ - overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. - - --==== overshifts.ts (54 errors) ==== -+==== overshifts.ts (18 errors) ==== - 1 << 1; // ok - 1 << 32; // overshift -- ~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. - 1 << 123; -- ~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. - 1 << 1024; -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. - 1 << -1; // OK-ish - 1 << -32; // backwards overshift -- ~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. - 1 << -123; -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. - 1 << -1024; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. - - 0xFF_FF_FF_FF >> 1; // ok - 0xFF_FF_FF_FF >> 32; // overshift -- ~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. - 0xFF_FF_FF_FF >> 123; -- ~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. - 0xFF_FF_FF_FF >> 1024; -- ~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. - 0xFF_FF_FF_FF >> -1; // OK-ish - 0xFF_FF_FF_FF >> -32; // backwards overshift -- ~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. - 0xFF_FF_FF_FF >> -123; -- ~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. - 0xFF_FF_FF_FF >> -1024; -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. - - 0xFF_FF_FF_FF >>> 1; // ok - 0xFF_FF_FF_FF >>> 32; // overshift -- ~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. - 0xFF_FF_FF_FF >>> 123; -- ~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. - 0xFF_FF_FF_FF >>> 1024; -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. - 0xFF_FF_FF_FF >>> -1; // OK-ish - 0xFF_FF_FF_FF >>> -32; // backwards overshift -- ~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. - 0xFF_FF_FF_FF >>> -123; -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. - 0xFF_FF_FF_FF >>> -1024; -- ~~~~~~~~~~~~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. - - let x = 1; - x <<= 1; // ok - x <<= 32; // overshift -- ~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. - x <<= 123; -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. - x <<= 1024; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. - x <<= -1; // OK-ish - x <<= -32; // backwards overshift -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. - x <<= -123; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. - x <<= -1024; -- ~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. - - x >>= 1; // ok - x >>= 32; // overshift -- ~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. - x >>= 123; -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. - x >>= 1024; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. - x >>= -1; // OK-ish - x >>= -32; // backwards overshift -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. - x >>= -123; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. - x >>= -1024; -- ~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. - - x >>>= 1; // ok - x >>>= 32; // overshift -- ~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. - x >>>= 123; -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. - x >>>= 1024; -- ~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. - x >>>= -1; // OK-ish - x >>>= -32; // backwards overshift -- ~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. - x >>>= -123; -- ~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. - x >>>= -1024; -- ~~~~~~~~~~~~ --!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. - - enum One { - A = 1 << 1, // ok \ No newline at end of file