Skip to content

Unrecognized method call with @CompileDynamic #1100

@mauromol

Description

@mauromol

Consider this Groovy class:

package test65

import groovy.transform.CompileDynamic
import groovy.transform.CompileStatic

@CompileStatic
class Test65 {

	@CompileDynamic
	static enum ShippingAddressSynchType {
		ACCOUNTING {
			@Override
			void synch(Test65 customer) {
				foo('foo')
			}
			
			private foo(String foo) { }
		};

		void synch(Test65 customer) { }

		private String truncate(String input, int maxLength) {
			if(!input)
				return input
			if(input.length() > maxLength)
				input = input[0..maxLength - 1]
			return input
		}
	}
}

The call to foo(String) is underlined and navigation to it does not work. If you remove @CompileDynamic both syntax highlighting and navigation work fine.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions