Sintaxis
- aThirdFun (anotherFun (myFun (), 42); // notación común (también válida)
- myFun (). anotherFun (42) .aThirdFun (); // UFCS
- myFun.anotherFun (42) .aThirdFun; // se pueden quitar las llaves vacías
Observaciones
En una llamada ab(args...)
, si el tipo a
no tiene un método llamado b
, el compilador intentará volver a escribir la llamada como b(a, args...)
.
UFCS - Sintaxis de llamada de función uniforme Ejemplos relacionados