From 538e315c1f1ffdf5222e6a0fbb35c703dba0b1d3 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Sun, 16 Dec 2012 23:23:42 +0400 Subject: [PATCH] IDEA-97587 Spread operator should be assumed to return a List when the invoked property or method is unresolved --- .../GrReferenceExpressionImpl.java | 66 ++++++++++++++----- .../lang/resolve/TypeInferenceTest.groovy | 9 ++- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrReferenceExpressionImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrReferenceExpressionImpl.java index fb54d94edf8c..7660417a228e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrReferenceExpressionImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrReferenceExpressionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -606,30 +606,62 @@ public class GrReferenceExpressionImpl extends GrReferenceElementImplx''', 'java.util.List') + } + private void doTest(String text, String type) { def file = myFixture.configureByText('_.groovy', text) def ref = file.findReferenceAt(myFixture.editor.caretModel.offset) as GrReferenceExpression @@ -607,4 +613,5 @@ def foo(def var) { } return b.toString() } + }