title: Call super throws "super is not an expression"
body: <p>I took up for learning implementing MVVM from Google Guide here: 
   <a href="https://codelabs.developers.google.com/codelabs/android-room-with-a-view/#8" rel="nofollow noreferrer">https://codelabs.developers.google.com/codelabs/android-room-with-a-view/#8</a>   (posted link especially to page I'm interested in).<br>
  Since I understood implementing it in Java, I decided to switch to Kotlin. 
  While initializing constructor in class extending <code>AndroidViewModel</code> I need to call <code>super</code> and it throws me following error:  </p>
  
  <blockquote>
    <p>"super' is not an expression it can only be used on the left-hand side
    of a dot ('.')"</p>
  </blockquote>
  
  <p>As I googled and found similar <a href="https://stackoverflow.com/questions/44481268/call-super-class-constructor-in-kotlin-super-is-not-an-expression">topic</a> but I haven't understood it at all so I didn't solve my problem.
  This my code for <code>ViewModel</code> class:</p>
  
  <pre><code> class NotesViewModel private constructor(application: Application) : AndroidViewModel(application){
  
      var mRepository: NotesRepository? = null
      var mAllNotes: LiveData&lt;List&lt;Notes&gt;&gt;? = null
  
      init {
          super(application) // &lt;-- here it throws me an error
          mRepository = NotesRepository(application)
          mAllNotes = mRepository!!.getAllWords()
      }
  
      fun getAllNotes(): LiveData&lt;List&lt;Notes&gt;&gt;{
          return mAllNotes!!
      }
  
      fun insert(notes: Notes){
          mRepository!!.insert(notes)
      }
  
  }
  </code></pre>
  
  <p>So, how should I properly call super, construct a constructor? 
  This is proper java code for this class:</p>
  
  <pre><code>public class WordViewModel extends AndroidViewModel {
  
    private WordRepository mRepository;
      private LiveData&lt;List&lt;Word&gt;&gt; mAllWords;
  
      public WordViewModel(Application application) {
          super(application);
          mRepository = new WordRepository(application);
          mAllWords = mRepository.getAllWords();
      }
  
      LiveData&lt;List&lt;Word&gt;&gt; getAllWords() {
          return mAllWords;
      }
  
      void insert(Word word) {
          mRepository.insert(word);
      }
  }
  </code></pre>