scala/scala3
Vedi su GitHubWarn when a pattern-bound variable shadows a regular variable
Open
#10.749 aperta il 10 dic 2020
area:pattern-matchingarea:reportingbackloghelp wanteditype:enhancement
Metriche repository
- Star
- (6247 star)
- Metriche merge PR
- (Merge medio 18g 14h) (133 PR mergiate in 30 g)
Descrizione
If someone writes:
object Test {
def foo[T](x: Int, y: Int) = x match {
case y => y
}
}
It means they forgot backticks and actually wanted to write case `y` => y, we should warn them about it (same with pattern-bound type variables).