scala/scala3
Ver no GitHubWarn when a pattern-bound variable shadows a regular variable
Open
#10.749 aberto em 10 de dez. de 2020
area:pattern-matchingarea:reportingbackloghelp wanteditype:enhancement
Métricas do repositório
- Stars
- (6.247 stars)
- Métricas de merge de PR
- (Mesclagem média 18d 14h) (133 fundiu PRs em 30d)
Description
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).