Syntax
- aThirdFun(anotherFun(myFun(), 42); // common notation (also valid)
- myFun().anotherFun(42).aThirdFun(); // UFCS
- myFun.anotherFun(42).aThirdFun; // empty braces can be removed
In a call a.b(args...)
, if the type a
does not have a method named b
, then the compiler will try to rewrite the call as b(a, args...)
.