Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-3803

spurious validation error when enum declares an abstract method

    XMLWordPrintable

    Details

      Description

      3.4.0.RELEASE
      Build Id: 201310051614

      The following enum is valid Groovy code but the IDE complains about an unsupported modifier (is abstract being added to the enum somewhere?):

      package test
      
      enum Bad {
      	A() {
      		@Override
      		int foo() {
      			1
      		}
      	}
      	abstract int foo()
      }
      

      Similar enum in Java works fine:

      package test;
      
      enum Fine {
      	A() {
      		@Override
      		int foo() {
      			return 1;
      		}
      	};
      	abstract int foo();
      }
      

      The command-line Groovy compiler doesn't seem to mind it either. I believe this used to work fine in previous versions of GGTS.

        Attachments

          Activity

            People

            Assignee:
            aclement Andy Clement
            Reporter:
            rchaves Rafael Chaves
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: