mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
Resolve in overlapping single type and on-demand static imports fixed
This commit is contained in:
+2
-2
@@ -22,8 +22,8 @@ import static <error descr="Field 'IF' is ambiguous in a single static import">x
|
||||
class Usage {
|
||||
void use() {
|
||||
m(Base1.F); //Base1.m(int)
|
||||
m(F); //Base2.m(float)
|
||||
F.class.getName(); // Base2.F
|
||||
m(F); //Base2.m(float), float Base2.F
|
||||
F.class.getName(); // class Base2.F
|
||||
m(<error descr="Reference to 'IF' is ambiguous, both 'field I1.IF' and 'field I2.IF' match">IF</error>);
|
||||
}
|
||||
}
|
||||
+2
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import x.E;
|
||||
import static x.Base1.*;
|
||||
import static x.Base2.*;
|
||||
|
||||
@@ -20,5 +21,6 @@ class UsageOnDemand {
|
||||
void use() {
|
||||
m(1); //Base1.m(int)
|
||||
m(1.0f); //Base2.m(float)
|
||||
E.class.getName();
|
||||
}
|
||||
}
|
||||
+1
@@ -20,4 +20,5 @@ public class Base2 extends Base1 {
|
||||
public static void m(float f) { }
|
||||
public static class F { }
|
||||
public interface II extends I1, I2 { }
|
||||
public enum E { }
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2011 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.
|
||||
*/
|
||||
package x;
|
||||
|
||||
public class E { }
|
||||
Reference in New Issue
Block a user