In this program, the last line does not compile (syntax error for the [Int]).
class A:
def f[X](s:String) = new B[X]
infix def g[X](s:String) = new B[X]
class B[X]
val a = new A
val b1 = a.f[Int]("abc") // ok
val b2 = a g[Int] "abc" // does not compile
Is it the expected behavior? Why such a difference between infix and dot notation?
In your case, it compiles because the [A] can be inferred from the type of a.
However, I’d like to have a similar behaviour for generic infix and dot invocation.