Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5411

Type checker doesn't seem to realise a non-static method won't satisfy a call from a static context

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0-beta-2
    • 2.0-beta-3
    • Static Type Checker
    • None

    Description

      Just got the 2.0 compiler into groovy-eclipse, so testing things out:

      import groovy.transform.TypeChecked;
      
      
      @TypeChecked
      class TC {
      
      	public static void main(String[] args) {
      		foo();
      	}
      	
      	public void foo() {}
      }
      
      

      No type checking error is reported here - I presume there should be one? (Since foo is not static)

      Attachments

        Activity

          People

            melix Cédric Champeau
            aclement Andy Clement
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: