SirNapkin1334
03/04/2021, 5:44 PMexpect class
, how would one go about adding functionality to it? say I was a kotlin dev and wanted to add a new function, where would the actual implementation be? or if i wanted to modify the signature of an existing function by adding a new argument with a default valuearaqnid
03/04/2021, 8:22 PMfun StringBuilder.myMethod()
: the implementation actually lives where the extension function is defined, i.e. equivalent to a Java static utility method. Extension functions are restricted to using the public API of the class they are defined as an extension on.araqnid
03/04/2021, 8:24 PMfun StringBuilder.toString(Charset)
that would sit alongside the existing class methods when resolving calls)SirNapkin1334
03/04/2021, 8:34 PMaraqnid
03/04/2021, 8:38 PMSirNapkin1334
03/04/2021, 8:46 PM