dotty-feature-requests icon indicating copy to clipboard operation
dotty-feature-requests copied to clipboard

allow type parameters for infix functions

Open robstoll opened this issue 5 years ago • 0 comments

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
    //...
  }
}

robstoll avatar Mar 06 '20 06:03 robstoll