dotty-feature-requests
dotty-feature-requests copied to clipboard
allow type parameters for infix functions
Consider the following:
import scala.annotation.infix
@infix def [T] (f: () => ?) toThrow(a: T => Unit) = 1
def main(args: Array[String]): Unit = {
{ () =>
//...
} toThrow[IllegalArgumentException] { t => // expression expected but '[' found
//...
}
}