diff options
Diffstat (limited to 'plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy')
-rw-r--r-- | plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy index 9762f6772016..96be1fe5be02 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/ResolveWithDelegatesToTest.groovy @@ -681,6 +681,24 @@ def staticOnWrapper() { ''', 'List') } + void testClassTest() { + assertScript(''' +class DelegatesToTest { + void create(@DelegatesTo.Target Class type, @DelegatesTo(genericTypeIndex = 0, strategy = Closure.OWNER_FIRST) Closure closure) {} + + + void doit() { + create(Person) { + a<caret>ge = 30 // IDEA 12.1.6 can resolve this property, 13.1.3 can't + } + } +} + +class Person { + int age +} +''', 'Person') + } void assertScript(String text, String resolvedClass) { myFixture.configureByText('_a.groovy', text) |