epfldata/squid

Warn when type parameters in patterns are inferred as `Nothing`

Opened this issue · 0 comments

LPTK commented

The following code does not currently raise a warning, but the pattern is too restrictive and does not match:

val q = ir"ArrayBuffer[Int]() foreach println" rewrite {
  case ir"($ab:ArrayBuffer[$t0]).foreach($f)" => ir"???"
}

(The correct pattern is case ir"($ab:ArrayBuffer[$t0]).foreach[$t1]($f)" =>.)