title: Why is this Scala example of implicit parameter not working?
body: <p>simple REPL test...</p>
  
  <pre>
  def g(a:Int)(implicit b:Int) = {a+b}
  </pre>
  
  <p>Why do neither of these attempted usages work?</p>
  
  <p>1.</p>
  
  <pre>
  scala> class A { var b:Int =8; var c = g(2) }
  :6: error: could not find implicit value for parameter b: Int
         class A { var b:Int =8; var c = g(2) }
  </pre>
  
  <p>2.</p>
  
  <pre>
  scala> class A(var b:Int) { var c = g(2) }  
  :6: error: could not find implicit value for parameter b: Int
         class A(var b:Int) { var c = g(2) }
                                       ^
  </pre>
  
  <p>Thanks</p>