title: Groovy compiler and non existing call method
body: <p>Why the following code doesn't raise a compile error ?</p>
  
  <pre><code>  class TestCompile {
      void foo() {
          println 'hello'
      }
  
      void foo2() {
          foo3()
      }
  
      static main(args) {
          new TestCompile().foo2()
      }
  }
  </code></pre>
  
  <p>When I compile:</p>
  
  <pre><code>groovyc TestCompile.groovy
  </code></pre>
  
  <p>No error occurs.</p>
  
  <p>But when I run the code : </p>
  
  <pre><code>java -cp groovy-all-2.4.6.jar:. TestCompile
  </code></pre>
  
  <p>The expected error occurs : </p>
  
  <pre><code>Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: TestCompile.foo3() is applicable for argument types: () values: []
  Possible solutions: foo(), foo2(), find(), find(groovy.lang.Closure), wait(), any()
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:81)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
          at TestCompile.foo2(TestCompile.groovy:7)
          at TestCompile$foo2.call(Unknown Source)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
          at TestCompile.main(TestCompile.groovy:11)
  </code></pre>
  
  <p>How can I the compiler raise a compilation error without to execute the class to have the error ?</p>