java method reference completion: don't show both ::Object and ::new, consistently process class and array types

GitOrigin-RevId: c9483bf7e47db78792a02856bd6988d5f63467f5
This commit is contained in:
Peter Gromov
2020-06-12 21:32:07 +03:00
committed by intellij-monorepo-bot
parent 8c31a5c569
commit faca9a8b19
8 changed files with 92 additions and 20 deletions
@@ -0,0 +1,23 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class Foo {
interface I { Object m(); }
void test() {
I i = Foo[]::n<caret>
}
}
@@ -0,0 +1,23 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class Foo {
interface I { Object m(); }
void test() {
I i = Foo[]::new;<caret>
}
}