mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-151371 Ambiguous import of Map that is not ambiguous anymore
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.codeInsight.intention
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.ImportClassFix
|
||||
import com.intellij.lang.java.JavaLanguage
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings
|
||||
@@ -101,6 +103,19 @@ public class Foo {
|
||||
'''
|
||||
}
|
||||
|
||||
public void "test use initializer"() {
|
||||
myFixture.addClass 'package foo; public class Map {}'
|
||||
myFixture.configureByText 'a.java', '''\
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Foo {
|
||||
Ma<caret>p l = new HashMap<>();
|
||||
}
|
||||
'''
|
||||
ImportClassFix intention = myFixture.findSingleIntention("Import class") as ImportClassFix
|
||||
assert intention.classesToImport.collect { it.qualifiedName } == ['java.util.Map']
|
||||
}
|
||||
|
||||
public void testUseOverrideContext() {
|
||||
myFixture.addClass 'package foo; public class Log {}'
|
||||
myFixture.addClass 'package bar; public class Log {}'
|
||||
|
||||
Reference in New Issue
Block a user