resolve for method reference qualifier should prefer classes in case of constructor refs (IDEA-164165)

This commit is contained in:
Anna.Kozlova
2016-11-18 17:58:54 +01:00
parent 44a8ce13bd
commit ec82847b4e
3 changed files with 28 additions and 1 deletions
@@ -0,0 +1,16 @@
import java.util.function.Supplier;
class TEST_NAME {
TEST_NAME(){}
}
class TEST_NAME1 {}
class TestClass {
static{
String TEST_NAME = "";
Supplier<TEST_NAME> s = TEST_NAME::new;
String TEST_NAME1 = "";
Supplier<TEST_NAME1> s1 = TEST_NAME1::new;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -525,6 +525,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testEnsureResolveToClassInConstructorRefs() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}