From 186b37845ee025412a8eb4d769bc2602d293c54c Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Tue, 27 Dec 2016 21:46:56 +0300 Subject: [PATCH] [groovy] auto overloads renamer test (follow up IDEA-CR-17081) --- .../refactoring/rename/RenameTest.groovy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/rename/RenameTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/rename/RenameTest.groovy index d59039014072..fb3ae6884eca 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/rename/RenameTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/rename/RenameTest.groovy @@ -759,4 +759,22 @@ trait T2 extends T { ''') } } + + void 'test rename reflected method with overloads'() { + fixture.with { + configureByText '_.groovy', '''\ +class A { + def foo(a, b, c = 1) {} + def foo(d = 2) {} +} +''' + renameElementAtCaretUsingHandler 'foo1' + checkResult '''\ +class A { + def foo1(a, b, c = 1) {} + def foo1(d = 2) {} +} +''' + } + } }