scala/scala3
在 GitHub 查看Warn when a pattern-bound variable shadows a regular variable
Open
#10,749 创建于 2020年12月10日
area:pattern-matchingarea:reportingbackloghelp wanteditype:enhancement
仓库指标
- Star
- (6,247 star)
- PR 合并指标
- (平均合并 18天 14小时) (30 天内合并 133 个 PR)
描述
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).