title: How to get the parent class inside anonymous class in kotlin
body: <p>I'm having trouble with Intent creation inside anonymous class in kotlin. I want to reproduce the code below in kotlin:</p>
  
  <pre><code>ModuleDAO.INSTANCE.refresh(new AnswerListener() {
      @Override
      public void onAnswerRetrieved() {
          final Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
          startActivity(intent);
          finish();
      }
  
      @Override
      public void onError(int error) {
          // doesn't matter
      }
  });
  </code></pre>
  
  <p>What I tried, but doesn't work:</p>
  
  <pre><code>ModuleDAO.refresh(object : AnswerListener {
      override fun onAnswerRetrieved() {
          val intent = Intent(SplashScreenActivity::act, MainActivity::class.java)
          startActivity(intent)
      }
  
      override fun onError(error: Int) {
          // doesn't matter
      }
  })
  </code></pre>