scala/scala3
GitHub で見るWarn when a pattern-bound variable shadows a regular variable
Open
#10,749 opened on 2020年12月10日
area:pattern-matchingarea:reportingbackloghelp wanteditype:enhancement
Repository metrics
- Stars
- (6,247 stars)
- PR merge metrics
- (平均マージ 18d 14h) (30d で 133 merged PRs)
説明
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).