title: Kotlin: For-loop range must have an 'iterator()' method
body: <p>If I use <code>var charSet = 1..10</code> it works, but when I am using the below code, I'm getting this error.</p>
  
  <pre><code>var charSet = "A".."Z"
  for (value in charSet) {    
    println("$value")  
  }
  </code></pre>
  
  <blockquote>
    <p>For-loop range must have an 'iterator()' method.</p>
  </blockquote>
  
  <p>Please let me know how to resolve this.</p>