Groovy 2.0을 사용하는 Grails 어플리케이션 중 하나를 2.2.0으로 업그레이드했는데 이제이 컴파일을 얻고 있습니다. 오류 :같은 이름의 private 메소드와 public/protected 메소드를 함께 사용하면 멀티 메소드가 사용 불가능하게되고 놀라운 동작을 피할 수 없습니다.
Mixing private and public/protected methods of the same name causes multimethods to be disabled and is forbidden to avoid surprising behaviour. Renaming the private methods will solve the problem.
다음 코드를 기반으로 :
def getRootDomain(key) { }
private getRootDomain() { }
그것은 쉽게 수정입니다하지만 난 정말 이유를 더 잘 이해하고 싶습니다. 누군가 나에게 이것을 설명 할 수 있습니까?
나는 그것을 보지 못했다. 감사. – Gregg