Resolve in overlapping single and on-demand static imports fixed

This commit is contained in:
Roman Shevchenko
2011-06-01 12:03:15 +04:00
parent 462af9fd64
commit b66b7a9d0a
4 changed files with 39 additions and 8 deletions
@@ -15,6 +15,7 @@
*/
import x.Base1;
import static x.Base2.F;
import static x.Base1.m;
import static x.Base2.m;
import static <error descr="Field 'IF' is ambiguous in a single static import">x.Base2.II.IF</error>;
@@ -0,0 +1,24 @@
/*
* 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.
*/
import static x.Base1.*;
import static x.Base2.*;
class UsageOnDemand {
void use() {
m(1); //Base1.m(int)
m(1.0f); //Base2.m(float)
}
}