diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/java/varargs.java | 5 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/data/java/varargs.java b/test/data/java/varargs.java new file mode 100644 index 00000000..a6af6a8d --- /dev/null +++ b/test/data/java/varargs.java @@ -0,0 +1,5 @@ +package test + +class Foo { + public void bar(String... x); +} diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index fe4fd322..e339f939 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -107,4 +107,14 @@ public class JavaTest { assertEquals("D", innerClass.name) } } + + Test fun varargs() { + verifyPackageMember("test/data/java/varargs.java") { cls -> + val fn = cls.members(DocumentationNode.Kind.Function).single() + val param = fn.detail(DocumentationNode.Kind.Parameter) + assertEquals("vararg", param.annotations.first().name) + val psiType = param.detail(DocumentationNode.Kind.Type) + assertEquals("String", psiType.name) + } + } } |