Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
4a8038fc
Commit
4a8038fc
authored
7 years ago
by
peter
1
Browse files
Options
Download
Email Patches
Plain Diff
java completion: no inaccessible methods when qualifier has intersection type (IDEA-187481)
parent
1973043b
Branches unavailable
Tags unavailable
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java
+3
-1
...codeInsight/completion/scope/JavaCompletionProcessor.java
java/java-tests/testSrc/com/intellij/java/codeInsight/completion/Normal8CompletionTest.groovy
+8
-0
.../java/codeInsight/completion/Normal8CompletionTest.groovy
with
11 additions
and
1 deletion
+11
-1
java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java
+
3
-
1
View file @
4a8038fc
...
...
@@ -220,7 +220,9 @@ public class JavaCompletionProcessor implements PsiScopeProcessor, ElementClassH
public
void
setQualifierType
(
@Nullable
PsiType
qualifierType
)
{
myQualifierType
=
qualifierType
;
myQualifierClass
=
PsiUtil
.
resolveClassInClassTypeOnly
(
qualifierType
);
myQualifierClass
=
PsiUtil
.
resolveClassInClassTypeOnly
(
qualifierType
instanceof
PsiIntersectionType
?
((
PsiIntersectionType
)
qualifierType
).
getRepresentative
()
:
qualifierType
);
}
@Nullable
...
...
This diff is collapsed.
Click to expand it.
java/java-tests/testSrc/com/intellij/java/codeInsight/completion/Normal8CompletionTest.groovy
+
8
-
0
View file @
4a8038fc
...
...
@@ -342,4 +342,12 @@ class Test88 {
private
checkResultByFileName
()
{
checkResultByFile
(
getTestName
(
false
)
+
"_after.java"
)
}
void
"test intersection type members"
()
{
myFixture
.
configureByText
'a.java'
,
'import java.util.*; class F { { (true ? new LinkedList<>() : new ArrayList<>()).<caret> }}'
myFixture
.
completeBasic
()
assert
!(
'finalize'
in
myFixture
.
lookupElementStrings
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
小 白蛋
@baidan
mentioned in commit
dcae4e0a
·
2 years ago
mentioned in commit
dcae4e0a
mentioned in commit dcae4e0a647d03990acbc4e2fc253b762b6e2fb9
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help