title: Implicit conversion not behaving as expected
body: <p>Do i have a misunderstanding how implciits work in Scala - given the following trait in Scala, </p>
  
  <pre><code>trait hasConfig {
  
    implicit def string2array(s: java.lang.String): Array[String] = {
      LoadedProperties.getList(s)
    }
  
    implicit def string2boolean(s: java.lang.String) :  java.lang.Boolean = {
      s.toLowerCase() match {
        case "true" =&gt; true
        case "false" =&gt; false
      }
    }
  
    var config: Properties = new Properties()
    def getConfigs : Properties = config
    def loadConfigs(prop:Properties) : Properties = {
      config = prop
      config
    }
  
    def getConfigAs[T](key:String):T = {
      if (hasConfig(key)) {
        val value : T = config.getProperty(key).asInstanceOf[T]
        value
      }
      else throw new Exception("Key not found in config")
    }
  
    def hasConfig(key: String): Boolean = {
      config.containsKey(k)
    }
  }
  </code></pre>
  
  <p>Though java.util.properties contains (String, String) key value pairs, I expect the following code to work due to the implicit converstion defined,</p>
  
  <pre><code>class hasConfigTest extends FunSuite {
    val recModel = new Object with hasConfig
    //val prop = LoadedProperties.fromFile("test") Read properties from some file
    recModel.loadConfigs(prop)
  
    test("test string paramater") {
      assert(recModel.getConfigAs[String]("application.id").equals("framework"))
    }
  
    test("test boolean paramater") {
      assert(recModel.getConfigAs[Boolean]("framework.booleanvalue") == true) 
      //Property file contains framework.booleanvalue=true
      //expected to return java.lang.boolean, get java.lang.string
  
    }
  }
  </code></pre>
  
  <p>However, I get the following error,</p>
  
  <pre><code>java.lang.String cannot be cast to java.lang.Boolean
  java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
  </code></pre>
  
  <p>Why is the implcit conversion not taking care of this? </p>