Expected Behavior
Highlight either the as keyword or the nullable type, maybe even just the question-mark.
Observed Behavior
Whole expression on the left of the cast is highlighted.

Steps to Reproduce
Any expression really, but it shows most when the casted thing is a chain of functional code
listOf("fieldName").map {
// very long code
String::class.java.getDeclaredField(it).get(null)
}.first() as String?
Context
Pretty much the same as #5316, but a different rule.
Your Environment
- Version of detekt used: 1.21.0
Expected Behavior
Highlight either the
askeyword or the nullable type, maybe even just the question-mark.Observed Behavior
Whole expression on the left of the cast is highlighted.

Steps to Reproduce
Any expression really, but it shows most when the casted thing is a chain of functional code
Context
Pretty much the same as #5316, but a different rule.
Your Environment