title: Error creating a field with functions when using Apache Thrift
body: <p>I started to use apache thrift (programming for java) and It's very hard to find documentation which explain in deeply about it - so I hope you'll be able to help me.</p>
  
  <p>I'm trying to make an service (interface) which has a function that return a field with functions (for example: another interface). </p>
  
  <p>I tried this code:</p>
  
  <pre><code>namespace java test
  
  service A {
    string somefunc()
  }
  
  service B {
    string somefunc2(),
    A getA()
  }
  </code></pre>
  
  <p>But I didn't success.. when I try to compile the thrift file I get an error that it in service B - A field is not defined.</p>
  
  <p>I tried also:</p>
  
  <pre><code>namespace java test
  
  struct A {
    1: string somefunc()
  }
  
  service B {
    A getA()
  }
  </code></pre>
  
  <p>This time it compiled successfully but it didn't count somefunc as a function however as a field in type of string.</p>
  
  <p>Is there anyway make something like what I want?</p>
  
  <p>Thanks!</p>