Egor Trutenko
10/08/2018, 8:16 AMMyClass is not yet defined. You should move fun1 to companion object and call it accordingly, or make it top-level function, unless it, of course, has to be attached to instance, in which case you'll have to find another way of creating default parameters.