title: How to return from a top level function while inside an inner function in kotlin?
body: <p>There are two functions, say <code>func1</code> and <code>func2</code>. <code>func2</code> is an inner function of <code>func1</code> and based on a condition I wish to return from func1, meaning end execution of func1. How do I do that in kotlin?</p>
  <pre><code>fun func1(){
      fun func2(){
          if(someCondition){
              ...
  
              return@func1 //How do I do this? since it says return not allowed here
          }
      }
  
      ...
  
      func2()
  }
  </code></pre>