Diagnostic about useless cast — compiler should warn with USELESS_CAST when an expression is cast to a type it already has (e.g., 42 as Int).
compiler/fir/analysis-tests/testData/resolve/problems/kt33403.kt
The test reproduces the issue by casting an Int literal to Int and a String literal to String. The FIR compiler correctly emits USELESS_CAST warnings for both casts (as Int and as String spans), confirming the diagnostic is already implemented and working in K2/FIR. The diagnostic spans cover only the as Type portion of the expression.
The test passes with the USELESS_CAST markers in place, meaning the bug described in the ticket (the diagnostic being expected) IS present as a warning — USELESS_CAST is emitted for the redundant casts.