title: Kotlin - How i can access my new class extension function from another file
body: <p>I am very new to Kotlin.</p>
  
  <p>I want to be able to add a function to my abstract class, so when I define that function I will be able to invoke that on every child from that class(they inherit the abstract class)</p>
  
  <p>However,I want to define those extension functions in other file. 
  I can't access those functions when i try to invoke them on a particular child implementation of the abstract class.</p>
  
  <p>What are the rules, that I need to made to resolve my problem?</p>
  
  <p>I want to by able achieve something like this:</p>
  
  <pre><code>abstract class Parent(val val1, val val2, val val3){}
  
  class Child(var val1, var val2, var val3) : Parent(val1, val2, val3){}
  
  class Child2(var val1, var val2, var val3) : Parent(val1, val2, val3){}
  </code></pre>
  
  <p>The extension method for parent and all childs:</p>
  
  <pre><code> fun Parent.convertToChild2( ): Child2? {
  
  return //some creation method of Child2
  } 
  </code></pre>
  
  <p>And I want to be able to invoke this:</p>
  
  <pre><code>child: Child
  child.convertToChild2
  </code></pre>
  
  <p>I defined all classes in separate file and also the extension function in other file. </p>
  
  <p>I cannot access the function like this - is not visible.</p>