scala/scala3
Auf GitHub ansehenWarn when a pattern-bound variable shadows a regular variable
Open
#10.749 geöffnet am 10. Dez. 2020
area:pattern-matchingarea:reportingbackloghelp wanteditype:enhancement
Repository-Metriken
- Stars
- (6.247 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 18T 14h) (133 gemergte PRs in 30 T)
Beschreibung
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).