mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-99196 Groovy: valueOf for Groovy enums with sinlge String arg
This commit is contained in:
@@ -86,3 +86,7 @@ contributor(ctype: 'groovy.lang.MetaClass') {
|
||||
property name: 'static'
|
||||
}
|
||||
|
||||
contributor(ctype: 'java.lang.Enum') {
|
||||
method(type: psiClass.qualName, name: 'valueOf', params: [name: 'java.lang.String'], isStatic: true)
|
||||
}
|
||||
|
||||
|
||||
+14
@@ -1494,4 +1494,18 @@ def 'a\\'bc'(){}
|
||||
"a'b<caret>c"()
|
||||
''', GrMethod)
|
||||
}
|
||||
|
||||
void testValueOf() {
|
||||
final valueof = resolveByText('''\
|
||||
enum MyEnum {
|
||||
FOO, BAR
|
||||
}
|
||||
|
||||
|
||||
MyEnum myEnum
|
||||
myEnum = MyEnum.va<caret>lueOf('FOO')
|
||||
''', PsiMethod)
|
||||
|
||||
assertEquals(valueof.parameterList.parametersCount, 1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user