title: How to increment an Integer field in a Kotlin Data Class
body: <p>I have a Data Class:</p>
  
  <pre><code>data class MyAlarmStatus(
      val notifyTimes: Int
  )
  </code></pre>
  
  <p>What I would like to do invoke this data class whilst <strong>incrementing</strong> the Integer field simultaneously:</p>
  
  <pre><code>val myAlarmStatus = MyAlarmStatus(
                  notifyTimes++
              )
  </code></pre>
  
  <p>However, this doesn't compile because of an <strong>unresolved reference</strong> on this field.  Anybody have an idea how to achieve this?</p>