title: Default argument value method location
body: <p>I'm writing a macro and I'm trying to locate where the method that generates default values is located for a local case class.</p>
  
  <p>For example, in a top level case class, like:</p>
  
  <pre><code>package foo
  
  case class Goo(a: String = "wibble")
  </code></pre>
  
  <p>I can easily find the method that returns "wibble" as <code>&lt;init&gt;$default$N</code> defined on the companion object for <code>Goo</code>. So something like:</p>
  
  <pre><code>val defswithsymbols = universe.asInstanceOf[Definitions with SymbolTable with StdNames]
  val defaultGetter = defswithsymbols.nme.defaultGetterName(defswithsymbols.nme.CONSTRUCTOR, index + 1)
  val method = tpe.companion.member(TermName(defaultGetter.toString))
  </code></pre>
  
  <p>And then I can invoke method on <code>tpe.companion</code> to give me the default value.</p>
  
  <p>However, if I have a case class defined inside a method, there is no companion object for the class (that I can find) and so I cannot locate the default argument generation method. But it must be defined somewhere right :)</p>
  
  <p>Edit: I think this question can probably boil down to - where is the companion object located for case classes declared inside a method?</p>