title: Generate companion object for case class with methods (field = method)
body: <p>Generate companion object for case class with scala-macros</p>
  
  <p>some code example that i tried, it works i can get list of tuple (name -> type) but how to generate the object in the same scope?</p>
  
  <pre><code>  import c.universe._
    val tpe = weakTypeOf[T]
  
    val fields = tpe.decls.collectFirst {
      case m: MethodSymbol if m.isPrimaryConstructor =&gt; m
    } .get
      .paramLists
      .head
  
    val extractParams = fields.map { field =&gt;
      val name = field.asTerm.name
      val fieldName = name.decodedName.toString
      val NullaryMethodType(fieldType) = tpe.decl(name).typeSignature
  
      c.Expr[List[(String, String)]](
        q"""
         ($fieldName, ${fieldType.toString})
        """
      )
  </code></pre>
  
  <p>Is it possible to annotate some case class and the generated companion make visible in the same scope? </p>
  
  <pre class="lang-scala prettyprint-override"><code>// test case: defined a class with some fields
  @GenerateCompanionWithFields
  case class SomeCaseClass(i: Int, b: Byte, c: Char)
  </code></pre>
  
  <p>goal: </p>
  
  <pre class="lang-scala prettyprint-override"><code>SomeCaseClass.i() // returns Int 
  SomeCaseClass.b() // returns Byte
  SomeCaseClass.c() // returns Char
  </code></pre>