title: How do I access a nested function in a scala object
body: <h2>I'm trying to access a nested function. I am able to access func1 but I'm running into issues when trying to access func2.</h2>
  
  <p>//attempting to call methods in different class</p>
  
  <pre><code>val t1 = test
  t1.func1()
  t1.func1(df).func2("test")
  
  object test {
      def func1 (df: dataframe): tt = {
  
        def func2 (ab: String): String =  {
          // do something
        } else {
          // do nothing
        }
  
        def func3 (ab2: String): String = {
          //do something
        } else {
          // do nothing
        }
  
      }
  
    val t1 = test
    t1.func1()
    t1.func1(df).func2("test")
  </code></pre>
  
  <p>I'm expecting to access func2 without any errors</p>