title: How to access secondary constructor parameter outside constructor block in Kotlin
body: <p>I am new to Kotlin and working through the tutorials that are available.
  However now I seem to have a problem with a secondary constructor:
  Parameters declared in the primary constructor can be accessed in a function,
  but when I try to do this with a parameter from the secondary constructor I get an error: Unresolved reference:nbr</p>
  
  <p>The code:</p>
  
  <pre><code>class Test(_name: String) {
  val name: String = _name
  
  constructor(_name: String, _nbr: Int) : this(_name) {
      val nbr: Int = _nbr
  }
  
  fun printNameAndNumber() {  
      println("Name: $name")
      println("Number: $nbr")
  }
  </code></pre>
  
  <p>}</p>
  
  <p>It is clear to me that I am doing something basically wrong but who can tell me what?</p>