Paul King created GROOVY-7987:
---------------------------------

             Summary: Type checker doesn't flag static method calls to instance 
methods with otherwise the same signature
                 Key: GROOVY-7987
                 URL: https://issues.apache.org/jira/browse/GROOVY-7987
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
            Reporter: Paul King


Example code which fails at runtime but should fail at compile time:
{code}
class Foo {
  def bar() {}
}

@groovy.transform.TypeChecked // MME at runtime, the same as dynamic groovy
//@groovy.transform.CompileStatic // would give GroovyCastException at runtime
def method() {
  Foo.bar()
}

method()
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to