title: Kotlin unexpected `unresolved reference`
body: <p>I'm a beginner to Kotlin, and here's my code:</p>
  
  <pre><code>class C(val boy: Int = 0) {
      fun &lt;T, E&gt; boy(i: Int) = i
  }
  
  fun girl(b1: Boolean, b2: Boolean) = println("boy($b1, $b2)")
  
  fun main(args: Array&lt;String&gt;): Unit {
      val A = 234 // see? A defined!
      val B = 345 // see? B defined!
      val c = C(123) // c is also defined!
  
      girl(c.boy &lt; A, B &gt; A) // hey look at here
  }
  </code></pre>
  
  <p>IntelliJ IDEA gives me:</p>
  
  <ul>
  <li><code>unresolved reference: A</code></li>
  <li><code>unresolved reference: B</code></li>
  <li><code>unresolved reference: c</code></li>
  </ul>
  
  <p>At the line <code>hey look at here</code>.</p>
  
  <p>I think my code is syntactically correct, what's wrong?</p>